cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
SW_Srinivas
Frequent Visitor

Hierarchical slicer and time period comparisons

Spoiler
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..

Swathi
@amitchandak 
@Shaurya 
@tamerj1  

Would highly appreciate your suggestions..
2 REPLIES 2
daXtreme
Solution Sage
Solution Sage

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

Hello,

 

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

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors