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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
rohit403
Helper I
Helper I

YoY Calculation & Dynamic Column Header

Dear All,

 

I need your help/ suggestions on the following:

 

I have to calculate YoY and CAGR numbers for a number of years. My entire dataset is using or refers to periods mentioned as four-digit years e.g., 2019, 2020, 2021, 2022. For values this is fine, however, for YoY calculations, I need the column heading to be shown as "2022 YoY... 2023 YoY". How can I do that?... Please help.

Now in a table, I have to show the data like this:

rohit403_0-1650864368082.png

The tables, measures, and parameters I have to use are:

rohit403_1-1650864422603.pngrohit403_2-1650864445837.pngrohit403_3-1650864470219.pngrohit403_4-1650864485165.png

 

 

 

1 REPLY 1
amitchandak
Super User
Super User

@rohit403 ,with help from a separate year or date table you can have measures like the example

 

This Year = CALCULATE(sum('Table'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))
Last Year = CALCULATE(sum('Table'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])-1))

diff = [This Year]-[Last Year ]
diff % = divide([This Year]-[Last Year ],[Last Year ])

 

 

But if you want a matrix with years and only select YOY, you might need a hybrid table

 

if you are looking for a Hybrid display with Matrix Column and measure
https://community.powerbi.com/t5/Community-Blog/Creating-a-custom-or-hybrid-matrix-in-PowerBI/ba-p/1...
https://community.powerbi.com/t5/Quick-Measures-Gallery/The-New-Hotness-Custom-Matrix-Hierarchy/m-p/...

vote for Hybrid Table
https://ideas.powerbi.com/ideas/idea/?ideaid=9bc32b23-1eb1-4e74-8b34-349887b37ebc

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

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.