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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
shirane
New Member

Average satisfaction by Manager if Manager exists in Manager 1 or Manager 2 columns

Hi,

I have a table of Employees Satisfaction. The table includes the employee name, satisfaction column (rating 1-5), Manager 1 (who is the employee's direct manager) and Manager 2 (Manager 1's manager). 

I need for each department manager (Manager 2) to calculate the average satisfaction in his/her department.

The problem is that it doesn't take into account the employees which are direct reports to that manager because he's their manager 1 and not their manager 2.

How can I solve this?

(hope my question is clear)

Shiran

5 REPLIES 5
Greg_Deckler
Community Champion
Community Champion

Probably something like:

 

Average Sat Measure = 
  VAR __Manager = MAX('Table'[Manager 2])
RETURN
  AVERAGEX(
    FILTER(
      ALL('Table'),
      [Manager 1] = __Manager ||
        [Manager 2] = __Manager
    ),
    [Rating]
  )

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi, thanks, is this a new measure in my table? please explain what I should do with this function, I'm pretty new to PBI 🙂

thanks!

Measures can live anywhere. Just right click your table and select "New Measure" and put the code in the formula bar. I used your sample data and created a PBIX for you.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

We need to see the data model and some sample data. Also, please give us an example of a correct calculation that highlights the issue you're facing.

Thanks.

Best
D

OK, see example below:

 

Emp NameSatisfactionManager 1Manager 2
John 4AmyMichael
Tracy3Michael Bob
Michael5BobSammy
Neal4BobSammy
David4AmyMichael

 

If I want to calculate Bob's deparment average satisafction, I'll need to take into account Tracy's, Michael's, and Neal's records and get an average of 4.3, but currently I only get Tracy's record because I have a "Clustered Column Chart" in which my axis is Manager 2 and the value is Average of Satisfaction. In Manager 2  column I am also only filtering specific managers' names that I wish to see.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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