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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Get Previous Quarter with Selected Quarter Slicer

I am looking to set up a graph that has dates on the x-axis that are in the currently selected quarter (using a slicer) as well as the previous quarter. If Q3 2022 is selected, the graph should range from 4/1/2022 to 9/30/2022.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I was able to format the existing date slicer and the detached yearquarter slicer the same and then group/sync them. Now when I change the date slicer, it changes the detached slicer to the same value and gives me the desired result. From there, I can just hide the detached slicer and continue using the date slicer like normal.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

I was able to format the existing date slicer and the detached yearquarter slicer the same and then group/sync them. Now when I change the date slicer, it changes the detached slicer to the same value and gives me the desired result. From there, I can just hide the detached slicer and continue using the date slicer like normal.

lbendlin
Super User
Super User

ok.  what is your question?  What have you tried and where are you stuck?

Anonymous
Not applicable

My question is how to set this up? I've tried using datediff and rank functions, but the issue I am running into is that it needs to be based on what is currently selected and return that quarter plus the previous quarter. If the quarter changes, the two quarters displayed need to change as well.

 

Edit: I just tried a solution that was suggested on another post ( Solved: Re: Show previous three quarters based on quarter ... - Microsoft Power BI Community ) and was able to get it to work using the separate year/quarter string table. I guess my new question is why can't I get it to work from the original date table provided the interactions are turned off? Ideally, I'd like to avoid having to break with the date table as their are other measures on the page that use the current yearquarter slicer.

Interactions are only affecting visuals. Your desired effect impacts the data model. You need to use disconnected tables to feed the slicer, and/or create special measures.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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