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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Frequent Visitor

Hierarchical slicer and time period comparisons

Hello Everyone,

I am building a PowerBI dashboard for Sales data with time series representation involved. 
Currently I am using a slicer with values Wtd, Mtd, Qtd, Ytd fed into it through independent table and making the report visuals reflect accordingly. I have measures build and works properly.

Suppose I was to replace this with a hierarchical slicer with - Years --> Quarters--> Months --> Week .
I have visuals which has previous time period vs. current time period revenue comparison.
Eg: Year column has values 2022, 2023
Qtr had Q1 to Q4 for the years and so on.
Now if I make a selection of year 2022, the comparison visual should show me revenue for 2022 vs revenue for 2021.
If 2022 Q2 is selected, comparison should be between 2022 Q1 and Q2.
If 2022 Q2 August is selected , then July vs. August 
If 2022 Q2 August Week 14( taking year of week) is selected, then Week 13 vs. Week 14

Is there a way I can achieve this using Dax?

Thanking you in advance..


Would highly appreciate your suggestions..
Solution Sage
Solution Sage

Here are patterns for custom calendars: Custom time-related calculations – DAX Patterns



This would work if I had one single column for Actual Sales.

However I have 4 columns in my datamodel for each record entry- Actuals Wtd, Actuals Mtd, Actuals Qtd

and Actuals Ytd.


Helpful resources


Fabric certifications survey

Certification feedback opportunity for the community.


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.

Top Solution Authors