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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
dhestarwirawan
Frequent Visitor

Total Sum of Grouped Average

Hi everyone,

 

I have the data with a structure like this

dhestarwirawan_2-1714988131290.png

 

I want to create summary like below table (let's call this summary table😞

dhestarwirawan_1-1714987947190.png

Where the GOE equals to Opex divided by Sum of Grouped Average TWPI.

For the Sum of Grouped Average TWPI, I wrote the DAX as below (I average the TWPI based on the Business column, and then sum all the grouped average):

Sum of Grouped TWPI = SUMX(SUMMARIZE(
    'Sheet1','Sheet1'[Business],"Total TWPI" ,AVERAGE('Sheet1'[TWPI])),[Total TWPI]
)
 
The above DAX is works for per company results, but does not work for total. In the summary table above, the total should be 21,828,883.
 
How to get the correct total sum amount for the TWPI?
 
Thanks!
1 ACCEPTED SOLUTION
samratpbi
Super User
Super User

Hi, first of all, I created a small subset of your table like below:

samratpbi_0-1714991878508.png

Then for for average TWPI, created below measure:

AvgTWPI =
IF(ISFILTERED(SumAvg[Period]),
    AVERAGE(SumAvg[TWPI]),
    SUMX(
        ADDCOLUMNS(
            SUMMARIZE(
                SumAvg,
                SumAvg[Period],
                SumAvg[Company]),
            "Avg_TWPI",
            AVERAGE(SumAvg[TWPI])
            ),
        [Avg_TWPI])
)
and the output is below:
samratpbi_1-1714992009009.png

It is taking sum of average fields.

If this helps to resolve your problem then please mark it as solution provided, thanks!

View solution in original post

1 REPLY 1
samratpbi
Super User
Super User

Hi, first of all, I created a small subset of your table like below:

samratpbi_0-1714991878508.png

Then for for average TWPI, created below measure:

AvgTWPI =
IF(ISFILTERED(SumAvg[Period]),
    AVERAGE(SumAvg[TWPI]),
    SUMX(
        ADDCOLUMNS(
            SUMMARIZE(
                SumAvg,
                SumAvg[Period],
                SumAvg[Company]),
            "Avg_TWPI",
            AVERAGE(SumAvg[TWPI])
            ),
        [Avg_TWPI])
)
and the output is below:
samratpbi_1-1714992009009.png

It is taking sum of average fields.

If this helps to resolve your problem then please mark it as solution provided, thanks!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.