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
koorosh
Post Partisan
Post Partisan

Bar chart- Total count bar along with count of other chosen parameter

Hello Experts, How we can create a bar chart with the total count bar along with a count of another parameter?

 

koorosh_0-1622834048059.png

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @koorosh 

I suggest having a dim-product table like below.

please check the sample pbix file's link down below.

 

Picture1.png

 

Qty Total =
IF (
SELECTEDVALUE ( Products[Product] ) = "Total",
CALCULATE ( SUM ( Sales[Qty] ), ALL ( Sales[Product] ) ),
CALCULATE (
SUM ( Sales[Qty] ),
TREATAS ( VALUES ( Products[Product] ), Sales[Product] )
)
)

 

 

https://www.dropbox.com/s/tj39bazeq2rit6s/koorosh.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

10 REPLIES 10
Jihwan_Kim
Super User
Super User

Hi, @koorosh 

I suggest having a dim-product table like below.

please check the sample pbix file's link down below.

 

Picture1.png

 

Qty Total =
IF (
SELECTEDVALUE ( Products[Product] ) = "Total",
CALCULATE ( SUM ( Sales[Qty] ), ALL ( Sales[Product] ) ),
CALCULATE (
SUM ( Sales[Qty] ),
TREATAS ( VALUES ( Products[Product] ), Sales[Product] )
)
)

 

 

https://www.dropbox.com/s/tj39bazeq2rit6s/koorosh.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hi, How we can find the percentage of each product in comparison with the total and present it as a Card visualization, please?

I did it.

Thanks, Jihwan, I have a table that lists partners and their agreement stage. Now I want to have a chart bar that presents the total number of agreements of a partner against its total number of Final (F) agreement (or other agreements). Also, have the percentage of “F” agreement against the total.

koorosh_0-1622867489339.png

 

Hi, @koorosh 

Thank you for your feedback.

May I know how your expected outcome looks like? It will be very much appreciated if I can see the numbers together with your preferred graph.

thank you.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Much thanks Jihwan,

koorosh_0-1622868701080.png

Or

koorosh_1-1622868764179.png

 

Hi, @koorosh 

Sorry that I still quite do not understand.

Can you please explain to me how the below numbers calculated from the table that you provided?

 

Total: 128

percentage: 20.86%

F agreement: 29

B agreement: 29

 

Thanks.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hi, Sure. 

29 is the count of F agreement of the company (company selected through a slicer). 128 is the total count of agreements that the company has in the table. 20.86% is the outcome of 20/128.

Is it clear ?

 

Regards

Hi, @koorosh 

Not clear.

In your table, I only can see the below

Co1 => 3 times of F

Co2 => 1 time of F

I cannot know how to count 128 times of F in your sample table that only contains 14 total rows.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hi, the image of the table is just an example. The image of the chart is not related to the table. That is also an example to clarify what expected for the outcome. Sorry. 

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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.