Forum Discussion
SUMX does not calculate at pivot aggregate level?
Hi everyone,
I am using the following formula, and I would like to calculate the ABS ERROR between the actuals and the forecast.
However, as you can see the it is not calculating at the pivot level. Shouldn't SUMX calculate the result at the aggregation provided in the Matrix? Why is not working?
Thanks a lot,
Riccardo
I created a varation of yours and it works.
ABSERR CNS = SUMX(SUMMARIZE('Dataset Agg','Dataset Agg'[SHIP_FROM],'Dataset Agg'[SUB_DIV],'Dataset Agg'[Period]),[ABS CNS])
10 Replies
- AlexisOlsonSuper User
The SUMX iterates over every row in the 'Dataset_Agg' table, not necessarily whatever rows you have showing in your pivot table. For each row in that table, it calculates the measure [Forecast] (converting the table row context to filter context via context transition) and takes the absolute difference between that measure and the table column 'Dataset_Agg'[Actuals].
How is the [Forecast] measure defined?
- riccardoprade93Helper I
Both Actuals and Forecast are two column of the table behind standing.
You can see below, in the second table the disaggregated data, that is why it calculate the ABS ERROR as 2,006.00
the DFU is the lowest disaggregation in my table.
is there a way to compute the ABS ERROR at aggregated level easily?
Riccardo
- tamerj1Community Champion
the screenshot is not clear from my end. I guess I have a technical issue. Would you please copy/paste the code and write down the nsmes of the two columns used in the matrix visual? Are they from the same table?
- riccardoprade93Helper I
Both Actuals and Forecast are two column of the table behind standing.
You can see below, in the second table the disaggregated data, that is why it calculate the ABS ERROR as 2,006.00
the DFU is the lowest disaggregation in my table.
is there a way to compute the ABS ERROR at aggregated level easily?
Riccardo
- tamerj1Community Champion
This how I see the screenshot from my end. Would you please write down the highlied formula and the names of the highlighted columns?
- AnonymousNot applicable
I am so glad to hear that your problem has been fixed , please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.