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
Anonymous
Not applicable

Matrix Average Aggregation Only Returning Average of Averages

I have a matrix visualization pulling several metrics in rows by date columns. Several of my metrics are calculated columns to get averages for example, total revenue / customer number to get average revenue per customer. But not all my metrics are per customer averages, so I have this measure to have some matrix rows as averages and some as sums (like total revenue) based off an added column listing each as "Sum" or "Avg".

 

ValueWithAggregation = IF(MIN('Booking Date'[Aggregation])="Avg", AVERAGE('Booking Date'[Value]), IF(MIN('Booking Date'[Aggregation]) = "Sum", SUM('Booking Date'[Value]), 0))

 

However, when i move up to weeks/months, for example it's taking each date and averaging the daily averages. How can I get it to sum the revenue metric then divide by the sum of customer metrics as the time drilldown changes for an accurate average? 

4 REPLIES 4
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

You may take a look at the following post.

https://community.powerbi.com/t5/Desktop/Create-a-Chart-with-Hierarchy-of-Month-and-Saturdays-in-that/m-p/458533#M212588

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Could you elaborate? I don't see how that relates...

Greg_Deckler
Community Champion
Community Champion

You probably need to use something like HASONEVALUE. Can't be absolutely sure without sample data to play with and expected output. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Also, see if this Quick Measure, Matrix Measure Total Triple Threat Rock & Roll helps:

https://community.powerbi.com/t5/Quick-Measures-Gallery/Matrix-Measure-Total-Triple-Threat-Rock-amp-...

 



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...
Anonymous
Not applicable

 

So, for example it's showing .90 is the average Passengers per PNR for the month of August (attached picture). But what it's doing is taking the daily Passengers per PNR for each day in August, and averaging them, but they're already averages. When I need it to do a real average as below:

 

Broken Average.JPG

 

 August Passengers per PNR  
8/28/20180.625 8/28/201850008000
8/29/20180.833333 8/29/201875009000
8/30/20181 8/30/20181000010000
8/31/20181.136364 8/31/20181250011000
avg of avgs0.898674 sum3500038000
   actual average0.921053 

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.

Top Solution Authors
Top Kudoed Authors