Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
benwebber92
Frequent Visitor

Calculating the Average Weekly % Difference between Expected and Actual figures

I have the below table in Excel imported into Power BI as a query which shows the week number of a group of people's Predicted and Actual figures for a task. 

While I can easily create a matrix that shows the Total Predicted, Total Actual, Total Difference and % Difference for the figures for each week, I also need to be able to calculate the Average Weekly % Difference - in other words, the arithmetic mean all of the '% Difference' figures.

 

Does anybody know how this could be done in Power BI?

 

edit: 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. 

 

WeekPersonPredictedActual
1A81474
1B11629
1C48385
1D4871
1 169252
1F48844
1G372268
1H58294
1I188244
1J48221
2K487372
2L391140
2M305262
2N387304
2O9287
2P30490
2Q10330
2R130103
3S342406
3T494307
3U168110
3V209386
3W236424
3X473365
4Y493460
4Z301366
4AA118389
4AB251474
4AC51228
4AD35668
4AE16827
4AF205251

 

WeekPredictedActualDifference% Difference
124851782-703-28.3%
221061688-418-19.8%
319221998764.0%
41943226332016.5%
Grand Total84567731-725-8.6%

 

Average weekly % Diff-6.9%
1 ACCEPTED SOLUTION

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]
)

 

q7.PNG

 

 

Best Regards,
QiuyunYu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
ausrine
Frequent Visitor

Wouldn't it be enough to create a measure with AVERAGE(%Diff)?

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.

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]
)

 

q7.PNG

 

 

Best Regards,
QiuyunYu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.