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]
)))
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:
You might want to share some screenshots of your setup.
User | Count |
---|---|
28 | |
27 | |
22 | |
13 | |
6 |