Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi, I have this measure that calculated average.
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.
Solved! Go to Solution.
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
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
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?
What? Why not?
Ok, this was created using a measure.
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.
ok, I think you will add so called "reference line".
like this:
You can add one in the Format pane od your visual.
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.
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 39 | |
| 37 | |
| 29 | |
| 24 |
| User | Count |
|---|---|
| 119 | |
| 100 | |
| 72 | |
| 69 | |
| 65 |