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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
newpbiuser01
Helper V
Helper V

Splitting Bar Chart by Color

Hello,

 

I am trying to create a bar chart and split the bars into different colors by the ID#. The X axis has the date, and for the y axis I used - countrows('SupplierTable'). To split the bars by ID - I put the ID in the Legend field. However, when I enable the data labels, Power BI assigns the total (e.g. 11) to all 4 "sections" - and the total becomes 44 instead of 11. What am I doing wrong? The only difference between the two graphs below is that I added the ID field as a Legend so I'm not sure why the total goes up! I'd really appreciate any help! 

 

newpbiuser01_3-1667845187070.png

 

newpbiuser01_4-1667845244951.png

 

 

1 REPLY 1
johncolley
Solution Sage
Solution Sage

Hi @newpbiuser01 , Looks like you don't have a relationship between the ID, Supplier count, or Date. You see the same value repeating like this when there's a missing relationship. 

 

https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-create-and-manage-relationships

 

If you require more assistance please post more information about how your data is structured or a sample pbix.

 

If this answer solves your problem please mark it as a solution!

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors