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
Anonymous
Not applicable

Can you use a slicer to change date hierarchy?

Hello - relatively new to Power BI, so please forgive the ignorance if you don't mind.

 

I have a set of transactions tracked for every business day. I've added a date table and can now take my daily transaction totals and roll them up by week, month, quarter, and year. Phenomenal.

 

What I would like to do is have a slicer to allow the consumer of the reports change the freqency that they're looking across all the charts by clicking through a very easy identifable list at the top of the report.

 

To create the dyanmic filter, I started by creating a disconnected table with the the period frequences I want them to have, along with a unique id number.

 

I then created a measure that uses SWITCH to allow me to reference the id number and pull in a specific measure based on what the frequency slicer has selected.

 

The issue I have is that I can't seem to figure out how to apply the date aggregation within DAX based on the frequency selected in my slicer.

 

Any thoughts? Or is there a simpler approach to my problem that I'm just unaware of?

 

Thanks very much in advance.

1 REPLY 1
v-shex-msft
Community Support
Community Support

HI @Anonymous ,

Please share some sample data with expect result to help us clarify your requirement.

How to Get Your Question Answered Quickly

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.