Forum Discussion

GVallentgoed's avatar
GVallentgoed
Helper II
2 years ago
Solved

Calculate YOY% Difference

I am trying to get a visual that dynamically shows the difference between 2 years (+1.26%), however my formula is giving me an incorrect value.  I am trying to get the forumla to calculate the average of each year divided by the maximum (56) and subtract those percenatges from eachother: formula below. using each side of the equation by itself gives me the correct value for each year. But trying to subtract them from eachother gives me an incorrect value. 


PLT DIF =
IF('TLO (2)'[Latest Pickup].[Year]=2024,CALCULATE(DIVIDE(AVERAGE('TLO (2)'[PLT]),56))) - (IF('TLO (2)'[Latest Pickup].[Year]=2023,CALCULATE(DIVIDE(AVERAGE('TLO (2)'[PLT]),56)))

 


 

1 Reply