Showing results for 
Search instead for 
Did you mean: 
pchung94 Visitor

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.

Community Support Team
Community Support Team

Re: Can you use a slicer to change date hierarchy?

HI @pchung94 ,

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

How to Get Your Question Answered Quickly


Xiaoxin Sheng

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

For learning resources/Release notes, please visit: | |

Helpful resources

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 314 members 2,566 guests
Please welcome our newest community members: