Forum Discussion
Stacked bar chart center aligned (variables average)
My sample dataset contains people from different teams (the filter below), and I want to show each team member's performance compared to the average line.
I read a post 4 years ago, it was wonderful but I couldn't fully copy it.
When I put the average revenue measure in, all data go to "label below 100" (light blue coloured for easy reading)
average revenue measure = [Sales_revenue] / COUNT('sales_teams'[sales_agent])
I think it is because the measure itself is already variable, it won't let me use the total average as the reference.
(as you see different people have a different avg revenue)
I am not quite sure which step I've gone wrong.
Is there any way I can use a team average revenue as the centre point, but each team will have a different average?
Hi bishophim
What do you mean by it wont "it won't let me use the total average as the reference"? The vertical line is at around 219K which is the average.
- Anonymous1 year ago
Thank you for your prompt reply! danextian
Hi bishophim
You can try changing "Teamavg_revenue" to the following version.Teamavg_revenue = CALCULATE ( AVERAGEX ( VALUES ( sales_pipeline[sales_agent] ), [Sales_revenue] ), ALLSELECTED () )Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
8 Replies
- bishophimFrequent Visitor
Hi, thanks for the reply and apologise for the confusion.
I was talking about the graph on the left, which I wanted to use the average as centre point, like below:
When I followed the instructions from the post link, it gave me a blank visual, so I turned the label colour on and found all visuals are on Label below 100, which is not what I want to have.
- danextian
Super User
Assuming the length of the bars are the same as the actual, please see the attached pbix.
- AnonymousNot applicable
Thank you for your prompt reply! danextian
Hi bishophim
You can try changing "Teamavg_revenue" to the following version.Teamavg_revenue = CALCULATE ( AVERAGEX ( VALUES ( sales_pipeline[sales_agent] ), [Sales_revenue] ), ALLSELECTED () )Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.