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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.