Forum Discussion

llucey's avatar
llucey
New Member
1 year ago
Solved

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:

    1. 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())

    2. Apply this measure as a filter to your visualizations, setting it to show only when IsDelayedBasedOnTier = TRUE.
     

4 Replies

  • v-priyankata's avatar
    v-priyankata
    Community Support

    Hi llucey 

    Thank you for reaching out to the Microsoft Fabric Forum Community.


    As per MasonMA suggested, please share basic sample data so we can work on this and will provide the solution.

    Thanks.

  • 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:

    1. 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())

    2. Apply this measure as a filter to your visualizations, setting it to show only when IsDelayedBasedOnTier = TRUE.
     
  • v-priyankata's avatar
    v-priyankata
    Community Support

    Hi llucey 

    I wanted to check if you had the opportunity to review the information provided rohit1991 . Please feel free to contact us if you have any further questions. If the issue still persists, please share sample data so we can work on resolving it.

    • v-priyankata's avatar
      v-priyankata
      Community 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.