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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Measure to get the SUM of an Average in a Matrix

I have a Matrix thats aggregating power generated against a windspeed (binned value)

The matrix subtotal shows the average of the whole data once filters are applied. Is there any way to calculate the sum of each row of the matrix (when each row contains an average). So the the column with the total saying 51.7. I need a measure where it sums each row in that matrix and gives me (with the selected slicers and filters): 154.15

 

I would need this measure to be divided by a constant and displayed as a score card so it doesnt have to show up in the matrix

 

I hope the screenshots suffice, it would take significant amount of time for me to recreate this with dummy data to be able to share the pbix but if thats whats needed then let me know.

 

 

 

ZeeGee_2-1654126122922.png

 

 

ZeeGee_1-1654125856231.png

 

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Does this measure work?

=SUMX(VALUES(Data[Wind speed [m/s]]),[Average of WT14_P_Avg])


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Does this measure work?

=SUMX(VALUES(Data[Wind speed [m/s]]),[Average of WT14_P_Avg])


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

I think the average per windspeed column was wrong. it had SUM instead of Average: 

probably something i messed with while tinkering

 

[WT14_P_Avg average per Wind Speed [m/s]]] =
AVERAGEX(
    KEEPFILTERS(VALUES(DATA[Column 2])),
    CALCULATE(AVERAGE('DATA'[WT14_P_Avg]))
)
 
It seems to be working. i'll play around and mark it as solution once confirmed. Thanks
Anonymous
Not applicable

This is the closest i can get to work:

Tot = SUMX(values(DATA[Column 2]),DATA[WT14_P_Avg average per Wind Speed [m/s]]])
Wind speed is coming from a difference table thats linked via relationship but the column 2 has similar data so ive changed that here hence DATA[Column 2])
 
what this is doing is giving me the sum of the entire column. not the sum of the average per windspeed (even though thats what the measure says)
 
second thing to note is that i dont see any WT14_P_Avg average per column 2]  but i went ahead and changed that measure (didnt see a difference in results but thats to be expected because they have similar data)
Attached 2 screenshots below - the scorecard on the top is the measure. in one screenshot ive changed the aggregation to sum of WT14_P_Avg to show what the measure is actually calculating
ZeeGee_0-1654129883411.png

 

ZeeGee_1-1654130187032.png

 

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.