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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

How can I sum each average value in one measure

Hi ,

I have a dataset like below:

lchi08978_0-1656998032975.png


I've calculate average 'Duration' group by 'Application',

DAX: avg_duration = CALCULATE(AVERAGEX('AP tbltimecard_engineering_system',

                                                                        'AP tbltimecard_engineering_system'[Duration]),
                                                      ALLSELECTED('AP tbltimecard_engineering_system'[Year_Week]))
 
result :
lchi08978_2-1656999253976.png

 


 

my next step is get sum of each application's average value
sum_average = 0.35 + 0.16 + 0.72 = 1.23
like below,
lchi08978_4-1656999555777.png

now I write hard code '1.23' into a measure ,

and I've tried every solution that I know on DAX,but still can't do what I want.

How do i do this?
Thank you for read to here .
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

I suggest you to try this code to create [avg_duration] measure.

avg_duration = 
VAR _SUMMAZIRE = 
SUMMARIZE (
    'AP tbltimecard_engineering_system',
    'AP tbltimecard_engineering_system'[ApplicationName],
    "avg_duration",
        CALCULATE (
            AVERAGE ( 'AP tbltimecard_engineering_system'[Duration] ),
            ALLEXCEPT (
                'AP tbltimecard_engineering_system',
                'AP tbltimecard_engineering_system'[ApplicationName]
            )
        )
)
RETURN
SUMX(_SUMMAZIRE,[avg_duration])

Result is as below.

RicoZhou_0-1657268639441.png

 

Best Regards,
Rico Zhou

 

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

4 REPLIES 4
Kishore_Kadhir
Resolver II
Resolver II

Hi @Anonymous 

 

Can you try the below measure and see if it works?

 

Sum of Average =
CALCULATE(
SUMX('AP tbltimecard_engineering_system',
CALCULATE(AVERAGE('AP tbltimecard_engineering_system'[Duration]), ALLEXCEPT('AP tbltimecard_engineering_system', 'AP tbltimecard_engineering_system'[ApplicationName]))
/
CALCULATE(COUNT('AP tbltimecard_engineering_system'[ApplicationName]),
ALLEXCEPT('AP tbltimecard_engineering_system', 'AP tbltimecard_engineering_system'[ApplicationName]))),
ALL('AP tbltimecard_engineering_system'))

Kishore_Kadhir_0-1657274854410.png

 

Regards,
Kishore

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , Try a measure like

 

calculate( AverageX(Values('AP tbltimecard_engineering_system'[Application Name]), [avg_duration ]), allselected())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak ,

 

I tried your measure,but the output seems not I want,

result:

lchi08978_0-1657008335200.png


did I write something wrong?

and thank you for your reply!

Anonymous
Not applicable

Hi @Anonymous ,

 

I suggest you to try this code to create [avg_duration] measure.

avg_duration = 
VAR _SUMMAZIRE = 
SUMMARIZE (
    'AP tbltimecard_engineering_system',
    'AP tbltimecard_engineering_system'[ApplicationName],
    "avg_duration",
        CALCULATE (
            AVERAGE ( 'AP tbltimecard_engineering_system'[Duration] ),
            ALLEXCEPT (
                'AP tbltimecard_engineering_system',
                'AP tbltimecard_engineering_system'[ApplicationName]
            )
        )
)
RETURN
SUMX(_SUMMAZIRE,[avg_duration])

Result is as below.

RicoZhou_0-1657268639441.png

 

Best Regards,
Rico Zhou

 

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.