Forum Discussion
PowerBi- Slicer
I have a slicer with two different school tiers created from a group and then I have a delayed minute slicer. I want to be able check Tier 1 and have it displayed minutes delayed more then 15 in the rest of the dashboard but when I click the Tier 2 from the slicer I want it to show delayed minutes value more then 10 minutes. If none of the values are sslected, I would like my dashboard to show 10 minutes or later.
Tier 1 checked- show later then 15 minutes in the dashbaord
Tier 2 checked- show later then 10 minutes in the dashbaord
If neither Tier 1 or Teir 2 are checked then have dashboard show later then 10 minutes.
Hi llucey
To achieve dynamic filtering based on slicer selection in Power BI where the delay threshold changes depending on the selected school tier you'll need to use a combination of DAX logic and measures. Since Power BI slicers don't natively support conditional filtering like this, the best approach is to create a measure that evaluates the slicer selection and returns TRUE or FALSE based on your specified rules, which can then be used as a visual-level filter across your dashboard.
Here’s how you can approach it in DAX:
-
Create a measure to evaluate the slicer selection and apply the correct delay threshold:
IsDelayedBasedOnTier =
VAR SelectedTiers = VALUES('TierTable'[Tier])
VAR DelayThreshold =
SWITCH(
TRUE(),
"Tier 1" IN SelectedTiers, 15,
"Tier 2" IN SelectedTiers, 10,
10
)
RETURN
IF([DelayedMinutes] > DelayThreshold, TRUE(), FALSE()) - Apply this measure as a filter to your visualizations, setting it to show only when IsDelayedBasedOnTier = TRUE.
-
4 Replies
- v-priyankataCommunity Support
- rohit1991Super User
Hi llucey
To achieve dynamic filtering based on slicer selection in Power BI where the delay threshold changes depending on the selected school tier you'll need to use a combination of DAX logic and measures. Since Power BI slicers don't natively support conditional filtering like this, the best approach is to create a measure that evaluates the slicer selection and returns TRUE or FALSE based on your specified rules, which can then be used as a visual-level filter across your dashboard.
Here’s how you can approach it in DAX:
-
Create a measure to evaluate the slicer selection and apply the correct delay threshold:
IsDelayedBasedOnTier =
VAR SelectedTiers = VALUES('TierTable'[Tier])
VAR DelayThreshold =
SWITCH(
TRUE(),
"Tier 1" IN SelectedTiers, 15,
"Tier 2" IN SelectedTiers, 10,
10
)
RETURN
IF([DelayedMinutes] > DelayThreshold, TRUE(), FALSE()) - Apply this measure as a filter to your visualizations, setting it to show only when IsDelayedBasedOnTier = TRUE.
-
- v-priyankataCommunity Support
- v-priyankataCommunity Support
Hi llucey
Hope everything’s going smoothly on your end. We haven’t heard back from you, so I wanted to check if the issue got sorted If yes, marking the relevant solution would be awesome for others who might run into the same thing. if not please share more details.