Forum Discussion
Pastrupgaard
8 years agoHelper I
Grand total wrong when using =IF formula
Hey guys. I’m new to Power BI and I’ve encountered a problem I can’t seem to fix. I’m not at liberty to post the actual numbers or a picture of the connections (everything should be connected though)...
- 8 years ago
Hi Pastrupgaard
It seems you forgot a part in your formula. You wrote this one:
Estimate ($) = (if(sum(f_sales_forecast[Forecast])=0;sum(f_sales[Actual]);sum(f_sales_forecast[Forecast])))
But if you want the sum of Actual + Forcast, you should write something like:
Estimate ($) = (if(sum(f_sales_forecast[Forecast])=0;sum(f_sales[Actual]);sum(f_sales_forecast[Forecast])+sum(f_sales[Actual])))
and it will give you your Grand Total
BeemsC
8 years agoResolver III
Hello,
I recreated this using a simpler table, and i think you are not supposed to use sum on every step.
I got it working using the following formula:
Estimate = IF(Table2[Forecast] = 0;Table2[Actual];Table2[Forecast])
Make sure you change the table names.
If it doesn't work for you, or if you have any questions please ask.
Good luck
Pastrupgaard
8 years agoHelper I