Forum Discussion

U382911's avatar
U382911
Frequent Visitor
2 years ago

Calculating YTD absolute error and YTD average abs error

Hello all,

Hoping for some assistance with this effort. I have the below matrix example, calculating the absolute error of forecast vs sales by product family by month:

 

I'm trying to calculate the YTD abs error and YTD average absolute error - so going from top to bottom (Cube to Sphere) for February I would expect the YTD avg abs error to be 11.02, 31.965, 42.99, and 132.28 respectively, and March would start off with 9.55 for Cube (avg of 11.02 for Jan + 11.02 for Feb + 6.61 for March), and so on.

 

I'd additionally like the YTD abs error value to be the sum of each month's abs error, rather than recalculating it monthly based on the sum of the FC and sales. (So, for example, March's YTD abs error for Cube would be 11.02+11.02+6.61 = 28.65, not the sum of orders from Jan-Mar (22.05+33.07+26.46) - the sum of FC from Jan-Mar (11.02+22.05+33.07) = 15.44).

 

I've attached a GDrive link to the example pbix for examination - please go easy on my limited DAX knowledge at this point. Help 

2 Replies