Forum Discussion
Hammarberg
9 years agoFrequent Visitor
How to calculate Forecast accuracy
Hi, I've been trying to get my head around how to calculate a forecast accuracy. Here is how I usually set up a simply formula in excel: First I calcula...
Brutus82
8 years agoRegular Visitor
As I see this problem, it's basically creating a Excel SUMIF() within DAX. My example is slightly different but hopefully illustrates the point. The key was creating a 'staticdate' dynamic value which every summed row was filtered on, like so:
Sum_error = VAR staticdate = nepool[date] return abs(sumx(FILTER(NEPOOL, NEPOOL[Date] = staticdate),NEPOOL[STF_Error])) / countrows(FILTER(NEPOOL, NEPOOL[Date] = staticdate))
Nepool is my dataset name. STF_Error is the error in the forecast. I divided it by the number of rows so the aggregation worked correctly.
James