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

Average Calculation Problem

I have two columns for employees and their leave details

1) If I Calculate the planned Average,  Because of the Same name it calculates as 1 instead of 2 

for example - Employee [Stace] has two plan leaves, when I calculate the average it gives me as  

TOTAL VALUE / COUNT(planned ) 

should take 6 instead its taking 4 because of same name 

Screenshot (85).jpg

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Share some data to work with and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

Share some data to work with and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Screenshot (87).pngThanks for your Reply

heygowtam
Helper II
Helper II

@danextian  Can you please help me

MahyarTF
Memorable Member
Memorable Member

Hi,

if you want to calculate the average of the planned value for each employee (exclude the null value) use the below code in your measure :

DIVIDE( sum(Sheet234[planned]), COUNT(Sheet234[planned]))
If you want to include the null value per each employee : 
DIVIDE( sum(Sheet234[planned]), CALCULATE(COUNTROWS(sheet234), Sheet234[Employe] = SELECTEDVALUE(Sheet234[Employe])), 0)
This is the sample data :
MahyarTF_0-1666057145204.png

Appreciate your kudos and please mark it as solution if it helps

Mahyartf

Hi, Thanks for the reply The value seems the Same even after trying both options.

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.

Top Solution Authors