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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

Trouble with Calculated Field for YoY

Hi all,

 

I am trying to create a calcualted field for YoY, but it is a little tricky...

 

The field I am trying to calculate YoY for is called "QTD Orders Revenue." I need to compare QTD Orders Revenue for "2022-Q3," the current quarter, to "2021-Q3," the same quarter but a year ago. Likewise, I want to calculate YoY for ANY previous quarters as well... I.e., "2022-Q2" vs "2021-Q2" or "2022-Q1" vs "2021-Q1" etc...

 

The biggest challenge is figuring out how to tell PowerBI that you need to subtract 1 from the year but keep the quarter the same.

 

Any help is appreciated 🙂 

 

Thank you!

 

Best,

Tanner

3 REPLIES 3
ryan_mayu
Super User
Super User

@Anonymous 

pls see the attachment to check if this is what you want





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




amitchandak
Super User
Super User

@Anonymous , Sameperiod last year can help

 

example

Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))

 

 

or

 

Last year same QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,Year)))
Last year same full QTR Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(ENDOFQUARTER(dateadd('Date'[Date],-1,Year))))

 

 

Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA


Power BI — Qtr on Qtr with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839
https://www.youtube.com/watch?v=8-TlVx7P0A0

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi, I tried SAMEPERIODLASTYEAR as well as DATEADD, but these formulas don't work since my FY-FQ column (i.e., 2022-Q1) is not formatted as a date. 

 

My dataset only has fiscal years and fiscal quarters, not exact dates.

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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