Forum Discussion
Calculating $ and % Variance in DAX
I'm struggling to get something really simple correct here.
Current Matrix:
| Financials | Actuals | Forecast | VAR $ | VAR % |
| Revenue | $9,375,398 | $10,119,803 | ($744,405) | -7.4% |
| EBITDA | ($523,357) | ($358,524) | ($164,833) | 46% |
Desired Matrix:
| Financials | Actuals | Forecast | VAR $ | VAR % |
| Revenue | $9,375,398 | $10,119,803 | ($744,405) | -7.4% |
| EBITDA | ($523,357) | ($358,524) | ($164,833) | -46% |
Actuals, Forecast, VAR $ and VAR % are all calculated measures; only the Revneue and EBITDA Row Headers are values from an imported table. I want the VAR % to be negative when comparing the variance of two negative figures; for example in the first table the VAR % vs the Forecast is -46%, since $164k is roughly 46% of $358k.
VAR % Measure:
VAR % = DIVIDE([VAR $], [Forecast])
The measure, ideally, should calculate the variance for the row values of "Revenue" and "EBITDA" in the Financials.
Any ideas?
Anonymous
You are 100% correct. Please tryVAR % = DIVIDE ( [VAR $], ABS ( [Forecast] ) )
3 Replies
- tamerj1Community Champion
Hi Anonymous
Please useVAR % = - ABS ( DIVIDE ( [VAR $], [Forecast] ) )- AnonymousNot applicable
This doesn't work; it renders positive amounts negative when the $ variance is positive, which is incorrect.
- tamerj1Community Champion
Anonymous
You are 100% correct. Please tryVAR % = DIVIDE ( [VAR $], ABS ( [Forecast] ) )