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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dhlavek
Frequent Visitor

Creating an Average Measure for Multiple Columns

Hi,

 

I'm trying to to create a row in a matrix that would calculate the average for each column.  Each column is a different measure.  So I have 5 columns of measures, and want 1 row at the bottom that is the Average.


Any ideas?

Thanks.

3 REPLIES 3
tex628
Community Champion
Community Champion

It's possible, which dimension are you going to use for your rows in the matrix?


Connect on LinkedIn

I'm sorry, if this isn't what you mean, but The columns would basically be different types of revenue(each its own measure) and the different rows would be various properties:

 

power bi.PNG

tex628
Community Champion
Community Champion

Exactly, 

If you want an average row then you would need to add a row to your properties table:

PropertyID
Property 11
Property 22
Property 33
Property 44
Property 55
Property 66
Average 


This should mean that you have one row in your matrix which displays "Average" instead of a property. 

Now you go into your measures and write something like this: 

IF( SELECTEDVALUE(Property[property]) = "Average" ; Calculate(AVERAGE([amount]) ; ALL(Properties)) ; [Amount])

It should return an average when it finds that post in the properties table and otherwise just return the normal amount on the other posts. 

Hope it works,

Johannes


Connect on LinkedIn

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.