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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
AlanP514
Post Patron
Post Patron

Dynamic Title for Previous quarter

Here i need to Create one dax title measure

Now the year is 2023 IS SELECTED and month is Dec

So total we have 4 Quarter

 

I need to create one dax measure and it should be a dynamic

 

Use case

 

If the year 2022 is selected and Month is December I need to create one dax measure output "Q3" (it should be Dynamic Ie one quarter less that means from month selection if i select again september i need to show Q2 as output )

 

If I select Jan from month slicer  and output should show Q4 (denoting previous year)

 

 

Expected end outPut should be like

 

"Sales Q3 with sales Selected Month (Decemeber 22)"
Here i am attaching the pbix file 

 

1 REPLY 1
amitchandak
Super User
Super User

@AlanP514 , you can use date tbale and time intelligence

 

Qtr Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(ENDOFQUARTER('Date'[Date])))

Last QUARTER Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD( ENDOFQUARTER(dateadd('Date'[Date],-1,QUARTER))))
Last QUARTER Sales = CALCULATE(SUM(Sales[Sales Amount]),PREVIOUSQUARTER(('Date'[Date])))

Last to last QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-2,QUARTER)))

 

Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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