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
mennosteen
Regular Visitor

Calculate an average of wait times

I'm trying to calculate the average TTA of a TTA grouped by call_ID, but it won't show the average of the sum correctly. Furhermore I want to combine call_id if just one of the call_id has been 1 on ext.nAnswered. I tried this with a filter but the lines with ext.nAnswered =0 are removed. 

 

Data:

mennosteen_0-1595849550064.png

The measure I used shows the sumof a call_id: 
TTA_Bundel = SUMX(SUMMARIZE(Telefoon, Telefoon[Call_ID], Telefoon[TTA]), Telefoon[TTA])
The output is:
test.png
I need help with two issues: 
1) I want to show an average of the TTA_bundel but it only shows the sum in the end.
2) The input from TTA should only be filtered out if the Call_IDhas no ext.nAnswered. 
a) for example: 1001008566V0200605should not show 10,46 but 30,502
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@mennosteen , try like

 

TTA_Bundel = averagex(SUMMARIZE(Telefoon, Telefoon[Call_ID],"_1", Telefoon[TTA]),[_1])
TTA_Bundel = averagex(SUMMARIZE(Telefoon, Telefoon[Call_ID],"_1", sum(Telefoon[TTA])),[_1])

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

View solution in original post

3 REPLIES 3
v-lionel-msft
Community Support
Community Support

Hi @mennosteen ,

 

You can do like this.

__Average = 
CALCULATE(
    AVERAGE(Sheet1[TTA]),
    ALLEXCEPT(Sheet1, Sheet1[Call_ID])
)
__One 1 = 
VAR x = 
CALCULATE(
    SUM(Sheet1[Answered]),
    ALLEXCEPT(Sheet1, Sheet1[Call_ID])
)
RETURN
IF(
    x = 1,
    SELECTEDVALUE(Sheet1[Call_ID]),
    BLANK()
)

v-lionel-msft_0-1595923690095.png

 

Best regards,
Lionel Chen

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

@mennosteen , try like

 

TTA_Bundel = averagex(SUMMARIZE(Telefoon, Telefoon[Call_ID],"_1", Telefoon[TTA]),[_1])
TTA_Bundel = averagex(SUMMARIZE(Telefoon, Telefoon[Call_ID],"_1", sum(Telefoon[TTA])),[_1])

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
Greg_Deckler
Community Champion
Community Champion

@mennosteen This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149

The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
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!

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.

Top Solution Authors