Forum Discussion
Total in Bar Chart
Dears,
I prepared the chart below, calculating the total price (measure) comparing the real (green) vs planning (blue and yellow) of two plants.
I need to see total at the end of chart. Is that possible?
Hi,
According to your description, I can roughly understand your requirement, I think the only way to achieve your requirement is to create a calculated table that uses UNION() to add the total rows to be placed into the clustered column chart to display the expected output. you can try my method:
This is the test data I created based on your description:
You can create a calculated table like this:
Total table = var _summarize=SUMMARIZE('Table','Table'[Type],"1",SUM('Table'[Price])) var _selectcolumns=SELECTCOLUMNS(_summarize,"Category","Total","Type",[Type],"Price",[1]) return UNION('Table',_selectcolumns)And you can create a clustered column chart to place like this to get what you want:
You can download my test pbix file below
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- v-robertq-msft
Community Support
Hi,
According to your description, I can roughly understand your requirement, I think the only way to achieve your requirement is to create a calculated table that uses UNION() to add the total rows to be placed into the clustered column chart to display the expected output. you can try my method:
This is the test data I created based on your description:
You can create a calculated table like this:
Total table = var _summarize=SUMMARIZE('Table','Table'[Type],"1",SUM('Table'[Price])) var _selectcolumns=SELECTCOLUMNS(_summarize,"Category","Total","Type",[Type],"Price",[1]) return UNION('Table',_selectcolumns)And you can create a clustered column chart to place like this to get what you want:
You can download my test pbix file below
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- amitchandak
Super User
Anonymous , refer this old solution
https://community.powerbi.com/t5/Desktop/Grand-Total-in-Bar-Chart/m-p/612631
- AnonymousNot applicable
Hi amitchandak ,
Thanks your suggestion.
But the values in my chart are nota column in table, they are measure calculated based on another measure (Price = Total / Quantity).
How can I do this?
Thank you.
- amitchandak
Super User
Anonymous , You have to populate the base columns and then use the measure