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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Sravanic07
New Member

Stacked Bar chart with multi legend

Hi,
I have to create this stacked bar chart with multiple legends .Each bar is represents a Doctors visits.
each block in the bar represensts a Visit ID and bar color is based on the vsist type. and I an only able to pull one legend column either Visist ID or Visist Tupe into the "Legend" section. I cant concatenate Visist ID and Type column to create a single column as Visist ID is ID column and will change everyday, Please suggesta solution.

 

Sravanic07_0-1761678712002.png

 

4 REPLIES 4
v-venuppu
Community Support
Community Support

Hi @Sravanic07 ,

May I ask if you have resolved this issue? Please let us know if you have any further issues, we are happy to help.

Thank you.

v-venuppu
Community Support
Community Support

Hi @Sravanic07 ,

Thank you for reaching out to Microsoft Fabric Community.

Thank you @Ritaf1983 @parry2k for the prompt response.

I wanted to check if you had the opportunity to review the information provided and resolve the issue..?Please let us know if you need any further assistance.We are happy to help.

Thank you.

Ritaf1983
Super User
Super User

Hi @Sravanic07 

From a technical standpoint, Power BI supports only one Legend, which is used exclusively for color grouping.
If you need to display additional descriptive information, you can place a text box above the native legend to simulate a multi-legend layout.

  • From a UX perspective, the chart shown is not an effective way to communicate data relationships:
  • The stacked bars create visual clutter, making it difficult to compare values accurately.
  • There are too many colors for the user to process efficiently.
  • Conceptually, a stacked bar works like a “narrow pie,” showing composition rather than clear absolute comparisons — which can lead to misinterpretation.

A clearer alternative would be to switch to a table with embedded bar visuals.

  • If the goal is to compare doctors both by total visits and by visit types — the first layout works best.
    Ritaf1983_0-1761745189937.png

     

If the goal is to show the overall share of each visit type within total activity — the second layout is more suitable.

Ritaf1983_1-1761745210825.png

 

If you need to explore results hierarchically (for example, drilling from Doctor to Patients) — use a hierarchical table instead.

This approach offers several advantages:

  • Precision: Exact numbers are visible while maintaining a visual cue.
  • Easy ranking: Sorting and comparing categories is straightforward.
  • Low cognitive load: Fewer visual elements mean faster interpretation.
  • Error-proof: Users are less likely to misread proportions or compare unrelated sections.
  • Scalable: Works well even with many categories or sub-categories.


The pbix with the example is attached

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
parry2k
Super User
Super User

@Sravanic07 unfortunaltey, you cannot have multiple legends in any of the visuals, howdo  you expect the output will look like with multiple legends?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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