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

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