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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
MiKeZZa
Post Patron
Post Patron

Average of Average

Hi all,

 

I'm having trouble while making an 'average of an average'. I see many people asking this here, but I can't find anything that solves my problem....

 

I'm having this data:

Naamloos.png

 

What you see is a table with: employees have records per day, most of the time 1 record. When they have more than 1 function/role in the organization there are more records (like emp_id 3). 

 

Naamloos.png

 

Now I want to calculate the duration of a sickness. I have this:

Naamloos2.png

 

But I want for the total this:

 

3.5 + 1 + 7 = 11.5, based on 3 persons so total is: 11.5/3= 3.83 and not 4.4.

 

So it must be the average of the average per person. How can I do this?????

 

 PBIX-file with these data and Measure is here: https://ufile.io/g96mu

 

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

Hi @MiKeZZa

 

Create a new MEASURE as follows which will refer your original MEASURE

 

Measure 2 =
IF (
    HASONEFILTER ( emp[Name] ),
    [Measure],
    AVERAGEX ( ALLSELECTED ( emp[Name] ), [Measure] )
)

Regards
Zubair

Please try my custom visuals

View solution in original post

3 REPLIES 3
Zubair_Muhammad
Community Champion
Community Champion

Hi @MiKeZZa

 

Create a new MEASURE as follows which will refer your original MEASURE

 

Measure 2 =
IF (
    HASONEFILTER ( emp[Name] ),
    [Measure],
    AVERAGEX ( ALLSELECTED ( emp[Name] ), [Measure] )
)

Regards
Zubair

Please try my custom visuals

@MiKeZZa

 

avgofavg.png


Regards
Zubair

Please try my custom visuals

Exactly what I was looking for!

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors