Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jcscheidl
Regular Visitor

Change date hierarchy level displayed in slicer based on selected value in another slicer

Hi all,

 

I'm having some trouble with slicers and hoping someone here can help -

 

Context:

I have 2 slicers:

  • A date hierarchy slicer that currently displays Year, Quarter, & Month -- able to be selected by users.
  • A 'Comparison Scope' slicer where users are able to choose "MoM" (month over month), or "QoQ" (quarter over quarter) to dictate the appropriate timeframe for analysis.

 

Problem Statement:

I would like for my date hierarchy slicer to allow for selection of the "Month" hierarchy level if the comparison scope slicer is set to "MoM" (year and quarter should still be visible for reference, just not able to be selected).

 

Conversely, I would like the date hierarcy slicer to only display "Quarters" as selectable if the comparison scope slicer is set to "QoQ" (years should still be visible, but months would not be necessary).

 

Is this acheivable?

 

Date Hierarchy Slicer

jcscheidl_0-1706289263436.png

 

Comparison Scope Slicer

jcscheidl_1-1706289315209.png

 

 

Thank you!

 

1 ACCEPTED SOLUTION
v-weiyan1-msft
Community Support
Community Support

Hi @jcscheidl ,

 

Based on your description, you want to dynamically change the optional levels in the Date Hierarchy slicer based on another slicer selection. Unfortunately, Power BI doesn't natively support changing the hierarchy levels that are selectable based on slicer inputs, but there is a workaround using bookmarks and buttons.
My Sample:

vweiyan1msft_0-1706514227994.png

Please try the following steps:
1. Create two separate slicers with different hierarchical structures, as shown below.

vweiyan1msft_1-1706514245428.pngvweiyan1msft_2-1706514253778.png

2. Use the Date Hierarchy Slicer to configure the report view of QoQ for selection at the quarterly level. Create a bookmark for this view and name it "QoQ View".
Do the same for the "MoM View".
3. Use the selection pane to hide or show the correct slicer based on the bookmark selected.

vweiyan1msft_3-1706514286203.png

4. Add buttons and assign actions to the buttons to activate the corresponding bookmarks.

vweiyan1msft_4-1706514304294.png

For more you may refer to:

How to create Bookmark with a Slicer in Power BI - YouTube

 

Best Regards,
Yulia Yan

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-weiyan1-msft
Community Support
Community Support

Hi @jcscheidl ,

 

Based on your description, you want to dynamically change the optional levels in the Date Hierarchy slicer based on another slicer selection. Unfortunately, Power BI doesn't natively support changing the hierarchy levels that are selectable based on slicer inputs, but there is a workaround using bookmarks and buttons.
My Sample:

vweiyan1msft_0-1706514227994.png

Please try the following steps:
1. Create two separate slicers with different hierarchical structures, as shown below.

vweiyan1msft_1-1706514245428.pngvweiyan1msft_2-1706514253778.png

2. Use the Date Hierarchy Slicer to configure the report view of QoQ for selection at the quarterly level. Create a bookmark for this view and name it "QoQ View".
Do the same for the "MoM View".
3. Use the selection pane to hide or show the correct slicer based on the bookmark selected.

vweiyan1msft_3-1706514286203.png

4. Add buttons and assign actions to the buttons to activate the corresponding bookmarks.

vweiyan1msft_4-1706514304294.png

For more you may refer to:

How to create Bookmark with a Slicer in Power BI - YouTube

 

Best Regards,
Yulia Yan

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-weiyan1-msft,

 

This worked like a charm. Thank you so much for turning me on to this capability! I'm still in the very early stages of learning this tool, so tricks like this are extremely helpful -- hopefully others think so as well!

 

Cheers,

Jake

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.