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
Justas4478
Post Prodigy
Post Prodigy

Return total of the average

Hi, I have this measure that calculated average. 

AVERAGEX(Personnel_Records,Personnel_Records[Hol Entitlement days]
My data only has one value per person and no dates. I am trying to modify measure to return total of the average as highlited in the photo.
Justas4478_0-1692175002844.png

Because if I use measure as it is atm it does not actualy give me average of all the values when I use it in column charts for all employees. I know that is because data has only one value per employee, thats why I need the average total. Here is example shown in the photo.

Justas4478_1-1692175213733.png 

 

Thanks.
1 ACCEPTED SOLUTION
sergej_og
Super User
Super User

Try to adjust your AVG calculation like this:

 

CALCULATE(
      AVERAGEX(
           Personnel_Records,
           Personnel_Records[Hol Entitlement days])
     , ALL(your employee column)
)

 

You have to remove the filter contex for your employees and consider all employees, not one by one.

hope i could transfer it correctly to your case

View solution in original post

9 REPLIES 9
sergej_og
Super User
Super User

nice, congrats.
ALL removes filter context (measures work always on filter context - inner and outer filter). Your filter context is/was employee dimension (on x-axis).
In other words, by using ALL you say DAX to calculate AVG by considering all employees not one by one. You say "don´t look at given filter context (=employee)", take all values.

Hope this helps a little better to understand.

Regards,
Sergej

sergej_og
Super User
Super User

Try to adjust your AVG calculation like this:

 

CALCULATE(
      AVERAGEX(
           Personnel_Records,
           Personnel_Records[Hol Entitlement days])
     , ALL(your employee column)
)

 

You have to remove the filter contex for your employees and consider all employees, not one by one.

hope i could transfer it correctly to your case

@sergej_og It worked. I am just not sure that I understand correctly what was the problem and how ALL solved it?

sergej_og
Super User
Super User

What? Why not?
Ok, this was created using a measure.

sergej_og_1-1692184485483.png

That´s what you want to achieve?

@sergej_og Yes I am trying to get measure that give that line when used in a chart.

sergej_og
Super User
Super User

ok, I think you will add so called "reference line".
like this:

sergej_og_0-1692178623932.png


You can add one in the Format pane od your visual.

sergej_og_1-1692178741413.png

In the section "line - Value" click on "fx" and add your AVG Measure.
See my result above. The line shows also an AVG.

Hope I catched it correctly.

Rergards

@sergej_og It does not seem that I have that option. Thats why I am trying to create a measure that would return that value to me, I as well could use it for other values.

Justas4478_0-1692179320010.png

 

sergej_og
Super User
Super User

Does it make sense to sum up average values?
Result of your AVG in table works as designed. It makes sense to me.
--------------
What do you expect when you sum all AVG result to one sum?
Maybe my unterstanding for your case is not correct.

Can you show your expectations as end result?
Just for better undestanding for your case
Thx.

@sergej_og I  would want measure to return only one value the total average value that is 25.5 in the sample image. If it helps I edited picture to show how I would expect outcom to look in the chart.

Let me know if it that answers your question.

Average.PNG

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.