Forum Discussion
Calculating the Average Weekly % Difference between Expected and Actual figures
- 9 years ago
Hi benwebber92,
You can create a measure like below. For details, you can see the attached Average weekly % Diff.pbix file.
Average weekly % Diff =
AVERAGEX (
ADDCOLUMNS (
SUMMARIZE (
'Table1',
'Table1'[Week],
"Predicted", SUM ( Table1[Predicted] ),
"Actual", SUM ( Table1[Actual] ),
"Diff", SUM ( Table1[Actual] ) - SUM ( Table1[Predicted] )
),
"%Diff", [Diff] / [Predicted]
),
[%Diff]
)Best Regards,
QiuyunYu
Wouldn't it be enough to create a measure with AVERAGE(%Diff)?
- benwebber929 years agoFrequent Visitor
Sorry to confirm, the second table in the post is actually a representation of the Matrix I've created in Power BI rather than a table created in Excel.
Difference and % Difference are both measures that I created in Power BI.
- v-qiuyu-msft9 years agoCommunity Support
Hi benwebber92,
You can create a measure like below. For details, you can see the attached Average weekly % Diff.pbix file.
Average weekly % Diff =
AVERAGEX (
ADDCOLUMNS (
SUMMARIZE (
'Table1',
'Table1'[Week],
"Predicted", SUM ( Table1[Predicted] ),
"Actual", SUM ( Table1[Actual] ),
"Diff", SUM ( Table1[Actual] ) - SUM ( Table1[Predicted] )
),
"%Diff", [Diff] / [Predicted]
),
[%Diff]
)Best Regards,
QiuyunYu