Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
iago_salvadori1
Frequent Visitor

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.

iago_salvadori1_3-1640618757117.png

I need to see total at the end of chart. Is that possible? 

 

iago_salvadori1_2-1640618555412.png

 

 

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
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:

vrobertqmsft_0-1640831312900.png

 

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:

vrobertqmsft_1-1640831312907.png

 

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.

View solution in original post

4 REPLIES 4
v-robertq-msft
Community Support
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:

vrobertqmsft_0-1640831312900.png

 

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:

vrobertqmsft_1-1640831312907.png

 

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
Super User

@iago_salvadori1 , refer this old solution

https://community.powerbi.com/t5/Desktop/Grand-Total-in-Bar-Chart/m-p/612631

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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.

@iago_salvadori1 , You have to populate the base columns and then use the measure

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.