Forum Discussion
harshagraj
6 years agoPost Partisan
To calculate Variance % from row level
Hi all, I have a screen shot below. I have a year field and Budget,Actual and Variance(Budget-Actual) and i have to calculate Variance % i,e Variance/Budget. Now i am getting wrong values as its calc...
- Anonymous6 years ago
Hi harshagraj ,
Check the following measure about calculating Variance% per year.
Measure = CALCULATE(SUM('Table'[Variance_1$]),ALLEXCEPT('Table','Table'[Date]))/CALCULATE(SUM('Table'[Budget_$_vw]),ALLEXCEPT('Table','Table'[Date]))If you want calculate Variance% for all years, just use ALL() function instead of ALLEXCEPT() function.
Result would be shown as below.Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
6 years agoSuper User
Hope you are using sum(A)/Sum(B) not Sum(A/B)
Like
divide((sum(Actual_$_vw)-sum(Table[Budget_$_vw])),sum(Table[Budget_$_vw]))
- harshagraj6 years agoPost Partisan
Hi amitchandak thank you but i am getting wrong values by that..I am getting -0.25 instead of -0.003.