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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Display Previous FY Year Quarter when previous year is Q4

Hey community. 

 

I am trying to display 2 values in 2 cards - the most recent fiscal year and quarter, and then the previous fiscal year and quarter. The most recent fiscal year & quarter is FY2021 Q1. The formula I used is

Most Recent Fiscal Year & Quarter = MAX ( 'Dates'[FY Year Quarter] )

The previous Fiscal Year will be FY2020 Q4.

What would be the DAX formulaic way to obtain the most recent Fiscal Year Quarter and the previous one? I wanted to use my Fiscal Year Quarter index and just subtract 1 but I wasn't sure how to subtract 1 from my Fiscal Year Fiscal Quarter Index but display another column. Currently I get the below. Smaple data set posted in link below

 

Link to sample dataset

https://drive.google.com/drive/folders/1V91FntSmy33fDwO2SHSIVe1xdBryQb-b?usp=sharing

 

beingandbrian_0-1595701550059.png

 

1 ACCEPTED SOLUTION
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

You can create a measure

 

Previous Fiscal Year & Quarter = CALCULATE(MAX(Dates[FY Year Quarter]),FILTER(Dates,Dates[Date] = MAX(Dates[Date]) - 90))

 

1.jpg

 

Regards,

Harsh Nathani

 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , for standard qtr , you can use datesqtd

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

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

 

for nonstandard/FY Qtr use Rank way used for week

https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123

FY Qtr of your choice

https://community.powerbi.com/t5/Community-Blog/Creating-Financial-Calendar-Decoding-Date-and-Calendar-1-5-Power/ba-p/1187441

Power BI — QTD Questions — Time Intelligence 2–5
https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839

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
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

You can create a measure

 

Previous Fiscal Year & Quarter = CALCULATE(MAX(Dates[FY Year Quarter]),FILTER(Dates,Dates[Date] = MAX(Dates[Date]) - 90))

 

1.jpg

 

Regards,

Harsh Nathani

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.