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
ugurgulluev
Helper II
Helper II

Average excluding blank cells

Dear all,

 

We are running an Employee Satisfaction Survey in our company but I am having hard time to find the average scores due to the blank cells in data cells, therefore looking for your valuable input.

 

I have a dataset like this:

 

ManagerQuestion 1Question 2Question 3Question 4Question 5Question 6
Alex452266
Alex6 34 8
Jake567418
Jake 7 6 4
Joe6 5 78
Joe 7    
Natalie4106473
Natalie1  6 6

 

Question 1 and Question 2, for example, belong to the "Leadership index" group. Therefore, in order to find the average score per manager for the "Leadership index", I created the following measure:

 

Leadership index = (AVERAGE(Sheet1[Question 1])+AVERAGE(Sheet1[Question 2])/2)

 

However, it results in incorrect scores as following, I believe because the measure does not exclude the blank cells while calculating the measure:

 

ManagerLeadership index
Alex7.5
Jake8.25
Joe9.5
Natalie7.5

 

 

Do you guys have any ideas on how to exclude the blank values while calcualating the measure so that I get the correct results?

 

Thanks for your support!

 

Ugur Gulluev

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

You just have a precedence issue (order of operations)

 

Leadership index Correct = (AVERAGE(Table10[Question 1])+AVERAGE(Table10[Question 2]))/2

@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Super User
Super User

You just have a precedence issue (order of operations)

 

Leadership index Correct = (AVERAGE(Table10[Question 1])+AVERAGE(Table10[Question 2]))/2

@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.