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
aaron797
Advocate I
Advocate I

How to show "Overall" Average on a bar graph with additional category

Hi,

 

How do i achieve the below graph? 

 

I have a category in the Axis field which seperates the graph into "Sport Coach" and "Specialist Service Provider".

The Value field consists of "Answer" which I then apply an average to.

I would like to show the average on the graph, without splitting it, any idea how to achieve this?

 

The average line under 'analytics' does not work, as it simply averages the two averages, and i also tried Grouping - however that removes the "Sport Coach" and "Specialist Service Provider".

 

image.png

 

Any ideas? 

1 ACCEPTED SOLUTION
v-joesh-msft
Solution Sage
Solution Sage

Hi @aaron797 ,

To achieve the result you want, you need to create a calculated table first:

Table 2 = UNION(VALUES('Table'[category]),ROW("c","Overall"))

Then create a measure similar to the following:

Measure =
VAR S =
    SELECTEDVALUE ( 'Table 2'[category] )
RETURN
    IF (
        S = "Overall",
        AVERAGE ( 'Table'[Answer] ),
        CALCULATE ( AVERAGE ( 'Table'[Answer] ), 'Table'[category] = S )
    )

Results are as follows:

21.PNG

Here is a demo, please try it:

https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EX-WboMvJdZKtfufql...

Best Regards,
Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-joesh-msft
Solution Sage
Solution Sage

Hi @aaron797 ,

To achieve the result you want, you need to create a calculated table first:

Table 2 = UNION(VALUES('Table'[category]),ROW("c","Overall"))

Then create a measure similar to the following:

Measure =
VAR S =
    SELECTEDVALUE ( 'Table 2'[category] )
RETURN
    IF (
        S = "Overall",
        AVERAGE ( 'Table'[Answer] ),
        CALCULATE ( AVERAGE ( 'Table'[Answer] ), 'Table'[category] = S )
    )

Results are as follows:

21.PNG

Here is a demo, please try it:

https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EX-WboMvJdZKtfufql...

Best Regards,
Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-joesh-msft  Fantastic! Thank you so much. Would you know how to order the values, so Overall is on top or bottom?

Hi @aaron797 ,

Select the ellipsis in the upper right corner of the visual--sort by, then select the field you want to sort:

22.PNG

Best Regards,
Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.