Hello everyone, I have an urgent situation that I need to solve, and I’d really appreciate it if you could help me.
I created a dashboard with a detail view and a table view. The purpose is to filter the table according to the detail view selection via a slicer, and it works fine. My current slicer rule looks like this:
AND(
IF(
ISNOTBLANK(Current User 2[eCommerce Director]),
IN([Sales Account Manager], Current User 2[eCommerce Director]),
TRUE
),
IF(
ISNOTBLANK(Current User 2[Start Date From]),
DATE([Start Date From]) >= DATE(Current User 2[Start Date From]),
TRUE
),
IF(
ISNOTBLANK(Current User 2[Account Type]),
IN([Account Status], Current User 2[Account Type]),
TRUE
),
IF(
ISNOTBLANK(Current User 2[Subscription Notes]),
IN([Subscription Notes], Current User 2[Subscription Notes]),
TRUE
)
)
Now, I want to add one more condition, but this one is a bit different from the others: it needs to filter based on a list column.
For example, if I select values a-b in the Active Subscription Type column, I need to filter rows in the Subscription Type column where the values are like a-b — b-a — or a-c-b, etc.
IF(
ISNOTBLANK(Current User 2[Active Subscription Type]),
CONTAINS([Subscription Type], Current User 2[Active Subscription Type]),
TRUE
)
But this only filters rows where a-b appear consecutively.
The only condition that worked as I wanted is the following, but it runs very slowly and there are a lot of values for the column:
IF(
ISNOTBLANK(Current User 2[Active Subscription Type]),
NOT(
OR(
AND(
CONTAINS(Current User 2[Active Subscription Type], “3PL”),
NOT(CONTAINS([Subscription Type], “3PL”))
),
AND(
CONTAINS(Current User 2[Active Subscription Type], “Reimbursement”),
NOT(CONTAINS([Subscription Type], “Reimbursement”))
),
AND(
CONTAINS(Current User 2[Active Subscription Type], “Managed Service”),
NOT(CONTAINS([Subscription Type], “Managed Service”))
),
AND(
CONTAINS(Current User 2[Active Subscription Type], “Platform”),
NOT(CONTAINS([Subscription Type], “Platform”))
),
AND(
CONTAINS(Current User 2[Active Subscription Type], “Vendor Recovery”),
NOT(CONTAINS([Subscription Type], “Vendor Recovery”))
)
)
),
TRUE
)
Is there a more efficient way to write this condition so it works as intended but without slowing things down?