cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

New Member

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

1 ACCEPTED SOLUTION
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
3 REPLIES 3
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
New Member

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
New Member

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

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

#### Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors
Top Kudoed Authors