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
wpf_
Post Prodigy
Post Prodigy

How to average each sub category then sum them?

I have a matrix that shows the time it takes cars to go from point A to point B at a certain location.  It shows the average speed of each hour (0 - 23) for that month.  

 

LA

wpf__0-1594918884634.png

 

But the problem is for certain locations (NY), it needs to add up each link ( avg(EB1) + avg(EB2) + avg(EB3) ) to make one virtual link that will show the a time to take to go that distance for that hour. 

 

wpf__1-1594917980803.png

 

So in the matrix it is showing the average of all 3 links, and not the sum of all three:

 

NY

wpf__1-1594918908001.png

 

Here is a link to my pbix sample in onedrive. Thanks.

 

https://1drv.ms/u/s!AkwCuDVUJER4gR-2qe6msJKTvv3u?e=XVxJFT

 

 

 

 

 

 

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

@wpf_ - So, you will want to use a measure and utilize SUMMARIZE or GROUPBY to group the data the way you want do your sums or averages. If you need to, you can use SUMX/AVERAGEX across that table. Not exactly sure I understand what you are going for exactly.



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

Hi @Greg_Deckler 

 

Thanks for responding.  I guess a better way to explain it is if I have a hierarchy (virtual travel time > individual travel time links).  And I put the hierarchy in the columns bucket in a matrix.  If I drill down to the individual travel time links, it shows the avg time per link.  But If i drill up to virtual travel time, it should give me the sum of each individual link.  Currently, virtual travel time is giving me the avg of the individual travel time links.  I provided a link to my pbix file, it might be easier to understand from there.  Hope you can help. Thanks. 

@wpf_ - OK, maybe take a look at MM3TR&R - https://community.powerbi.com/t5/Quick-Measures-Gallery/Matrix-Measure-Total-Triple-Threat-Rock-amp-...

 

Basically, shows how to do different aggregations at different levels of a matrix.

 

Also the more general technique in dealing with measure totals, is this Quick Measure, Measure Totals, The Final Word:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907



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

@Greg_Deckler ,

 

Thanks i was able to get another measure to sum the measure that averages.  

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!

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