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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
THENNA_41
Post Partisan
Post Partisan

YTD & YTG calculation with new header

I am trying to calculate YTG and  YTD calculation  like new header  2022-2021 ,2023-2022,2024-2023,2025-2024.I have posted sample Data for reference 

 

(previousyear -Currentyear)/Currentyear

 

Region      Date        -    Year                      Value        

west        Jan-2021       2021                        250

west        Jan-2022       2022                        350

west        Jan-2023       2023                        420

west        Jan-2024       2024                        460

west        Jan-2025       2025                        440

 

Expected Output :       

                                            '

2022-2021           40%

2023-2022          -17%

2024-2023           -9%

2025-2024           5%

 I want to show above result in the Group .

 

Looking for support . thanks in  advance

 

 

2 REPLIES 2
THENNA_41
Post Partisan
Post Partisan

@amitchandak  created the column  when i was apply the column its not showing the value .  when i use orignal column use its showing the value 

amitchandak
Super User
Super User

@THENNA_41 , You have to create a new column

 

Year name = [Year] & "-" &[Year] -1

 

and measure like diff % can be used

 

//Only year vs Year, not a level below

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 ])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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

Top Kudoed Authors