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
AJW2023
Regular Visitor

Calculate average at different hierarchy levels in Matrix

I am attempting to calculate the average itmes sold across different rows (hierarchy) of a matrix table to then compare to the actual number sold for each month and identify through conditional formating months where the number of items sold were above the average.

 

Example: 

Calulate the average sold per month for 'Site A' (44/12 = 3.67) to then be able to identify the months where 'Site A' sales was above the average.

Then calculate the average sold per month for area 'Blue' (next level of the hierarchy) and identify the months where 'Blue' area items sold were above the average.

 

AJW2023_1-1673575456744.png

Thanks

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@AJW2023 , Assuming you only want to change grand total

 

First, create a measure

M1= Sum(Table[Number sold])

 

Then create and use this measure

m2= Averagex(Values(Table[Month]), [M1])

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@AJW2023 , Assuming you only want to change grand total

 

First, create a measure

M1= Sum(Table[Number sold])

 

Then create and use this measure

m2= Averagex(Values(Table[Month]), [M1])

Thats @amitchandak .  That has calculated the averages for each of the rows as I was hoping. 

 

Any ideas how to then compare each months total per cagegory and display if it is greater than the average using conditional formating?

 

For example for "Site A" the average is 3.67 therefore the months where the number sold were greater than the average = January, Feburary, May, July, August and September and highlight these values Red

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.

Top Solution Authors