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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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

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.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.