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
jhartranft60
Advocate IV
Advocate IV

Finding Average of a Calculated Measure

Hello,

 

I'm creating a Report that provides managers and directors their performance ratings.  For managers, these ratings are determined by a formula based on the requirements that they have to complete Task A at least 3 times and have a total task count (Total_Count = Task A + Task B) of 14,16 or 18 for the different rating tiers (2,3,4).  Anyone that does not meet those criteria get a rating of 1.  Here's the Measure I use to perform this calculation:

 

Manager_Rating = IF( [Total_Count]<14,1,IF( [TaskA_Count]<3, 2, IF( [Total_Count ]<16, 2, IF( [Total_Count]<18,3,4))))

 

That's easy enough and works perfectly.  The problem is that the directors are then rated by averaging the rating of the managers that report to them.  I can't figure out how to capture the Managers' ratings in order to average them.  Everything I try just rolls up the task counts to the directors and puts those numbers through the formula, giving every director a perfect rating. 

 

I'm sure there is an easy solution, but I'm a self-taught developer and this one is elluding me.  Any help is greatly appreciated!!

 

Example of current table

 

 Rating
Director 1 
 Manager 1A4
Manager 1B2
Manager 1C3
Director 2 
Manager 2A4
Manager 2B3
Manager 2C3
Director 3 
Manager 3A4
Manager 3B4
Manager 3C3

 

Example Data (there are a LOT more columns, but I believe only this is needed for this question)

 

DirectorManagerTask Type
Director 1Manager 1ATask A
Director 2Manager 2ATask B
Director 3Manager 3BTask B
Director 2Manager 2CTask A
1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

Hi
Try with
Director_rating=averagex(values(table1[managers]), [manager rating])

Regards
Zubair

Please try my custom visuals

View solution in original post

2 REPLIES 2
Zubair_Muhammad
Community Champion
Community Champion

Hi
Try with
Director_rating=averagex(values(table1[managers]), [manager rating])

Regards
Zubair

Please try my custom visuals

Thanks!  Believe it or not, I'd actually already tried this, but after reading your reply and trying again, I realized that I'm an idiot.  I'd copied the table from a different tab (It's the exact same, minus hierarchy and a filter), but never cleared the filter that was needed on the other tab, but not this one. 

 

I've been staring at this for a few hours and your post gave me the confidence to let me know my original formula was right all along and I just needed to troubleshoot elsewhere!

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.