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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
apohl1
Helper I
Helper I

Display value and percentage in stacked bar chart

Hi all,

 

Does any of you know if it's possible to show both values AND percentage in a stacked bar chart? As an example, in the chart below, I'd like it to show 28% next to 30M, and 72% next to 79M.

 

Capture.PNG

 

 

 

 

Thank you in advance!

8 REPLIES 8
Bijen_Shah
Regular Visitor

Indeed , It is possible with some Power BI measures magic. @apohl1 @v-cazheng-msft @amitchandak 

I created 3 measures:
1. Count = COUNTROWS('Table')
2. Count % = 

DIVIDE([Count],
CALCULATE(COUNTROWS('Table'),ALLSELECTED('Legend'))
)
where Legend -> i had the category column showing buy/sell trades

3. 
Count Concat = [Count] & " (" & ROUND([Count %],2) * 100 & "%)"

Use the "Count Concat" measure in the D
ata Labels -> Values -> Custom Label field.

Screenshot of my solution:
Bijen_Shah_0-1698414025278.png

 


Let me know if this works for you!!

This is very elegant!

Thanks, it worked!

v-cazheng-msft
Community Support
Community Support

Hi @apohl1,

 

Currently, we are not able to display values along with percent in a Stack bar chart at the same time. You may consider these solutions.

1 Voting for similar ideas in Power BI ideas: https://ideas.powerbi.com/ideas/search-ideas/?q=values%20and%20percent%20%20stack%20bar%20chart

2 Take the solution from the super user d_gosbell  in this post: https://community.powerbi.com/t5/Desktop/Stacked-Bar-Chart-Percent-AND-Count/m-p/632510

3 Consider Tootip, the solution from v-cherch-msft in the same post above

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

Thank you for your reply! At least it confirms what I'd like to do is currently not available. I will vote for this idea to be implemented hopefully soon.

@apohl1 
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos!! Happy to Help!
 
amitchandak
Super User
Super User

@apohl1 , this video has one solution , check if that can help

Change Data labels
https://www.youtube.com/watch?v=un4PkoGF3YM

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

Thanks for your message, but I'd like to show value and percentage at the same time, so unfortunately not a solution. 


Thanks anyway!

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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