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
nagaraj007
Post Patron
Post Patron

Need to show percentage YOY based on Financial Year

Hello All,

 

I have excel data wherein i dont have the dates, but i have Year Column (its calculated from Jan - Dec) and one more column Financial Year (Apr - Mar).  

Excel Data 

 

I would like to calculate and show YOY percentage as per the attached image. Please help me to get the required output.

output.png

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@nagaraj007 , Write an if or Switch in power query and give each qtr a number , Then create a column either with year or FY year

Qtr Year = [Year] & [Qtr No]

Also create a separate table with all these qtr year column

create rank on Qtr year and year

new columns

Qtr Rank = RANKX(all('Date'),'Date'[Qtr year],,ASC,Dense)

 

measure example

This Qtr = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])))
Last Qtr = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])-1))

 

new column

Year Rank = RANKX(all('Date'),'Date'[FY],,ASC,Dense)

 

measure example

This Year = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Year Rank]=max('Date'[Year Rank])))
Last Year = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Year Rank]=max('Date'[Year Rank])-1))

 

refer

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

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@nagaraj007 , Write an if or Switch in power query and give each qtr a number , Then create a column either with year or FY year

Qtr Year = [Year] & [Qtr No]

Also create a separate table with all these qtr year column

create rank on Qtr year and year

new columns

Qtr Rank = RANKX(all('Date'),'Date'[Qtr year],,ASC,Dense)

 

measure example

This Qtr = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])))
Last Qtr = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])-1))

 

new column

Year Rank = RANKX(all('Date'),'Date'[FY],,ASC,Dense)

 

measure example

This Year = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Year Rank]=max('Date'[Year Rank])))
Last Year = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Year Rank]=max('Date'[Year Rank])-1))

 

refer

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

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.