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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
oliverblane
Helper III
Helper III

Use Multiple Binary Columns as Separate Bars in Bar Chart

Hi. I have a table like the following:

oliverblane_0-1651049343572.png

The table shows which products customers have ordered (ID is the customer ID).

 

I have a bar chart like the following:

oliverblane_1-1651049431479.png

 

Is there any way to have the bars separated and with their labels underneath them, instead of as a cluster of bars?

 

Sample File: sample_file.pbix

 

Thanks for any help on this!

1 ACCEPTED SOLUTION
AntonioM
Solution Sage
Solution Sage

You could unpivot those product columns in Power Query

AntonioM_0-1651050776134.png

That will give you a table like this

AntonioM_1-1651050795303.png

And then you can use the 'attribute' column as the axis in the bar chart

AntonioM_2-1651050816121.png

 

View solution in original post

2 REPLIES 2
AntonioM
Solution Sage
Solution Sage

You could unpivot those product columns in Power Query

AntonioM_0-1651050776134.png

That will give you a table like this

AntonioM_1-1651050795303.png

And then you can use the 'attribute' column as the axis in the bar chart

AntonioM_2-1651050816121.png

 

Very helpful, thank you @AntonioM!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.