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
m_chan
Regular Visitor

Showing items within group in a legend (stacked column chart)

I am trying to build the following stacked column chart:

  • the stacked bars (associated with the legend) are for categories I have custom grouped - 3 groups = 3 differently colored blocks
  • the legend showcases what group is associated with each of the 3 colored blocks, however also lists out the individual items that are within each of the custom groups I had created

 

Is this possible to do? Thank you

 

3 REPLIES 3
Daniel29195
Super User
Super User

@m_chan 

it would be helpful if you can show your desired output, 

 

 

 

Thank you. Below is an example of a sample data set I threw together - would it be possible to list out all the Clothing Types shown in the legend of the left-hand graph (ie: button up, dress pants, etc.) underneath the respective group they belong to in the right-hand graph? The last screenshot shows what clothing types are within each group.

 

m_chan_0-1706115893997.png

m_chan_1-1706116025146.png

 

 

@m_chan 

 

To be able to achieve what you want, you need to be able to add 2 columns in the legend which is not simething you can do in power bi . 

 

one possible option maybe, to create a concatenated column as : 

 

new column = table_name[clothing_type_groups] & " - " & table_name[clothing_type]

 

and use it as a legend . 

 

 

another option is using a custom visual : like this one .

 

Daniel29195_1-1706121462279.png

 

 

third option would be : adding both columns to the X-axis.

 

Daniel29195_2-1706121574670.png

and enable the drilldown option ( circled in red ) , 

this way when you click on a group  it automatically goes to the second level .

Daniel29195_3-1706121641077.png

 

 

 

 

let me know if these are possible solutions for you. 

 

 

 

 

If my response has successfully addressed your issue kindly consider marking it as the accepted solution! This will help others find it quickly. Dont forget to hit that  thumbs up button 🫡👍

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.