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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

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

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.