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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

How to calculate YOY variation, when a measure is split by column

Hi, i'm having a sikmple issue, I get the right value with my measure Total actual consolidated, when I add the Year in column, i get the right output, but i d'ont know how to calculate YOY, with the calculate function, and group calculation some row from the Subtotal measure are missing, i dont know why. Any help is much welcomed

 

Hugiz_0-1724870502293.png

  1. subtotal actual =
  2.  
  3. if(COUNTROWS('SIG structure')=1,
  4. CALCULATE([Total actual],
  5. all('SIG structure'),
  6. 'SIG structure'[row index]<=Values('SIG structure'[row index])))
  7.  

 

  1. Total actual = sum('BG groupe'[Solde])

2

 

  1. Total actual consolidated =
  2. SWITCH(true(),
  3. SELECTEDVALUE('SIG structure'[Subtotal])="0",[Total actual],
  4. SELECTEDVALUE('SIG structure'[Subtotal])="1",[subtotal actual],BLANK())

 

Thks a lot

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

You can use  "SAMEPERIODLASTYEAR" to get the sales for the same period last year.

For example:

Calculate the year-on-year value:

PY Sales = CALCULATE([Sales Amount], SAMEPERIODLASTYEAR('Date'[Date]))


Calculate YOY growth rate:

YOY Growth = DIVIDE([Sales Amount] - [PY Sales], [PY Sales])

 

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous 

You can use  "SAMEPERIODLASTYEAR" to get the sales for the same period last year.

For example:

Calculate the year-on-year value:

PY Sales = CALCULATE([Sales Amount], SAMEPERIODLASTYEAR('Date'[Date]))


Calculate YOY growth rate:

YOY Growth = DIVIDE([Sales Amount] - [PY Sales], [PY Sales])

 

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors