Expression with And & Or

Alex3
New Member

Hello,

I am trying to create a slice that will select cars that have:

  1. A certain rental status (either 2, 5, or 3) and
  2. A rental date that is between 14 days old and 7 days after the current date.

Below is the slice expression that I wrote. The expression is not quite capturing the correct records.

AND
(OR([RentalStatusID]=2,[RentalStatusID]=5,[RentalStatusID]=3),
OR((AND([RentalDate] >= (TODAY() - 14),[RentalDate] <= TODAY())),
AND([RentalDate] <= (TODAY() + 7),[RentalDate] <= TODAY())))

Any ideas?

Thanks,

Alex

Solved Solved
0 3 151
1 ACCEPTED SOLUTION

Alex3
New Member

Thank you Marc and Steve,

After I changed the
โ€™ [RentalDate] <= TODAY()โ€™
to
[RentalDate] >= TODAY()

, at the end of expression, the formula worked.

Marcโ€™s expression worked as well. I learned something new with the LIST expression.

View solution in original post

3 REPLIES 3
Top Labels in this Space