MULTIPLE CRITERIA FOR SLICE ROW FILTER CONDITION (DASHBOARD)

I have 3 conditions to meet:

1. If either the "Month" or "Type" columns are blank, it will display all the details.

2. If the "Month" column is not blank, it will display the details from "Transportation" table only if the selected "Month" matches the value in the "Filter Transportation" table.

3. If the Month" column is not blank and "Truck Type" column is not blank, it will display the details of the selected "Month" and "Truck Type" matches any of the values in the "Filter Transportation" table.

But it seems my formula is not correct. It only meets the first 2 conditions.

When  i enter a value in "Month" and "Truck Type" column it only filters according to "Month" it does not filter according to "Truck type" as well.

OR(
AND(
ISNOTBLANK([Month]),
[Month] = ANY(Filter Transportation[Month])
),
AND(
ISNOTBLANK([Month]),
ISNOTBLANK([Truck Type]),
[Month] = ANY(Filter Transportation[Month]),
[Truck Type] = ANY(Filter Transportation[Truck Type]
)))

1 8 331
8 REPLIES 8

Do you think the expression should be like this ?

OR(
AND(
ISNOTBLANK( ANY(Filter Transportation[Month]) ),
[Month] = ANY(Filter Transportation[Month])
), โ€ฆโ€ฆ

)

Thanks @Rifad 

would it be possible to help me

construct the correct formula? ๐Ÿ™๐Ÿป๐Ÿ™๐Ÿป๐Ÿ™๐Ÿป

is this correct?

OR(
AND(
ISNOTBLANK(ANY(Filter Transportation[Month])),
[Month] = ANY(Filter Transportation[Month])
),
AND(
ISNOTBLANK(ANY(Filter Transportation[Month])),
ISNOTBLANK(ANY(Filter Transportation[Truck Type])),
[Month] = ANY(Filter Transportation[Month]),
[Truck Type] = ANY(Filter Transportation[Truck Type])
))

AND(
  ISNOTBLANK([Month]), [Month] = ANY(Filter Transportation[Month]),
  IF(ISBLANK([Truck Type]), true, [Truck Type] = ANY(Filter Transportation[Truck Type]))
)

Thanks @Joseph_Seddik 

I tried the formula but it does not filter when i enter value in "Month" column only. It does not display anything.

The formula does work when i key value in both columns

 

You must have entered the expression incorrectly. 

I copied the expression you helped me with...

The expression does the following: 

  • If you don't enter either the Month or the Truck Type, it filters out all the rows. 
  • If you enter the Month only, it will filter by the Month.
  • If you enter the Truck Type only, it filters out all the rows.
  • If you enter the Month and the Truck Type, it filters by both. 

You might want to share some screenshots of your setup. 

Top Labels in this Space