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
Jasel
Helper II
Helper II

Group by with percentage growth

I have a weird calculation I need to make to calculate growth percentage.  The difficulty is how the data is stored:

 

Item Year Revenue
X 2015 500
X 2016 605
Y 2015 400
Y 2016 805
Z 2015 205
Z 2016 405


It looks like I need to use GroupBy instead of Summarize but I just haven't been able to figure out the right way. 

 

End result would be:

 

Item Revenue Growth
X21%
Y101.25%
Z97.56%

 

Any assistance is greatly appreciated.

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

@Jasel You'll need a Calendar Table (if you don't have one go here )

 

Total Revenue = SUM('Table'[Revenue])
YTD Total Revenue = TOTALYTD([Total Revenue], CalendarTable[Date])
PY Total Revenue = CALCULATE([YTD Total Revenue], PREVIOUSYEAR(CalendarTable[Date]))
YoY Change = [YTD Total Revenue] - [PY Total Revenue]
YoY % = DIVIDE([YoY Change], [PY Total Revenue], 0)

 

Then it will NOT matter how your table is sorted etc...

I added 2014 to be double 2015 so you get negative for 2015

YoY Revisited.png

View solution in original post

12 REPLIES 12

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.