Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi all,
i have a Quarter field. like bleow 2019Q1,2019Q2,2019Q3,2019Q4 ,2020Q1,2020Q2
So now my requirment is whenever i open the dashboard i want to show latest 4 qurts to be shown in table .later on user will do slice and dice,
it should be dynamic . it should always take latest four quarters only to be selected.
hi @Anonymous
It couldn't achieve that set a default value for a slicer, becasue when you log out of Power BI and come back to a report, the same items will be selected as when you left.
here is the idea, please see detailed explanation in it:
For your case, you could try ibarrau's workaround.
Regards,
Lin
Hi. Please consider having a calendar table each time you want to use date in your analysis. First you need a date column (the best option is that the date column is related with the calendar table so you can on calendar table), then you can add a calculated column dax code like this:
Last 4 quarters =
IF(
DATEDIFF(Calendar[Date], today(), QUARTER) <= 4,
"Last 4 quarters",
"From last 4 quarter to firt date"
)
That way you create a column that substract dates with today by quarter. If the result es 4 or less then it's in the last 4 quarters. You can add any text or result you want like the text I'm suggesting.
Once you have this new column just add it as a filter on the page (it can be in the filter pane or in the page). Select the "Last 4 quarters" and boom. Each time the dataset is refreshed it will filter by last 4 quarters from today.
NOTE: if you don't have a date column you can replace "Q1" with "-01-01" to have something from 2019Q1 to 2019-01-01. With that new column the dax should work too.
Hope this helps,
Regards,
Happy to help!
@Anonymous you can use relative date filtering functionality, read here.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@parry2k I don't think you can. The relative date will only let you work with days, weeks, months and year. However I haven't seen quarters in that analysis. He can try 12 months (4 quartes) because if he doesn't have dates and 2019Q1 = 2019-01-01 then you can use last 12 months but if he has dates like 2019-04-26 that row will need the dax because it won't be filtered with the relative properly.
:S
Happy to help!