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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.