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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
o59393
Post Prodigy
Post Prodigy

How to use 2 values within a stacked bar chart with a legend

Hi all

 

I have a stacked bar chart with a legend and I'd like to have next to the end of each graph bar the HC result (see red arrow in the image). For that, it would be required to have 2 values within the x-axis. 

 

I know this is not possible because of the legend that doesnt allow 2 values. But is there any way to have it with a measure or special calculation ? 

 

 

o59393_0-1713650780918.png

 

 

I attach the pbix.

legend_2values.pbix

 

Thanks

 

Thanks.

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @o59393 ,

I think you can use Clustered bar chart, but it can only allow you to put the below chart on the top.

vyilongmsft_1-1714032348699.png

vyilongmsft_0-1714032246887.png

 

 

 

Best Regards

Yilong Zhou

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

5 REPLIES 5
VahidDM
Super User
Super User

If you like to show the Number of HC beside the Perent o fthe total, in the Data Lables of the visual formatting pane, slect the Value and set that to Sum of HC like this:

VahidDM_0-1713653366947.png



The output:

VahidDM_1-1713653380290.png



If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

LinkedIn | Twitter | Blog | YouTube 

VahidDM
Super User
Super User

Hi @o59393 

 

Do you want to show 2 values (numbers) in each bar? like %56 - 218?
Can you describe the output with more details please? 

 

Regards,

Vahid

Hi @VahidDM 

 

Thanks for your reply. Let me explain better and attach the pbix corrected.

 

Click on the image to see at a better resolution:

o59393_0-1713720951419.png

 

Basically is to have the disctinct count of the column 'name' at the end of each graph bar. As an example, I manually added the numbers 60 and 34 values with Paint to better explain the desired outcome.   

 

So intead of having 2 graphs, I would just like to have one. 

 

Here is the pbix. legend_2values.pbix

 

Thanks a lot. 

 

 

Hi @VahidDM 

 

Any idea how to get this?


Thanks.

Anonymous
Not applicable

Hi @o59393 ,

I think you can use Clustered bar chart, but it can only allow you to put the below chart on the top.

vyilongmsft_1-1714032348699.png

vyilongmsft_0-1714032246887.png

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors