Forum Discussion

FBleijendaal's avatar
FBleijendaal
Regular Visitor
8 years ago

Forecast Error - Total not correctly calculating

Hi All,

 

I am working on Forecast Accuracy calculation and need to calculate Forecast Error.

Forecast Error is the Absolute difference between Forecast and Order Intake. In the picture below you see the calculation.

However I can't get the total correct. So yes, Forecast total is 5K, and Order Intake is 2805, but the Forecast error needs to be the total of 345+3000+1150. And not the difference between 5K and 2805.

So how can I get the total calculation the total, instead of calculating it only on the Forecast and Order Intake totals?

 

Formula Used:

value fo = CALCULATE(SUM(Accuracy[Value]),Accuracy[Attribute]="Forecast")

value fo = CALCULATE(SUM(Accuracy[Value]),Accuracy[Attribute]="Forecast")

Forecast Error = (ABS([value fo]-[value oi]))

 

Let me know if you need any more information or even the Power Bi file.

 

Thanks!

 

Fons

1 Reply

  • jthomson's avatar
    jthomson
    Icon for Solution Sage rankSolution Sage

    You're going to need to use some conditional logic in order for this to work - you'll need to go with an if(hasonevalue) type formula to make it recognise it's the total row, and then have it sumx your measure across your whole sample, and then use your existing formula otherwise. Totals "not working properly" with non-standard sums is a fairly common issue, have a search around for similar problems