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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Liamp
Regular Visitor

Clustered bar charts not getting expected results

Hello,
Very new here.
I've been trying to work out how I can get a clustered bar chart to have the results I desire. This is to have the Y axis broken up into 4 categories and then
have four bits of data in the X axis. I've included a table of some created example data.
On the Y Axis I'll have Animal Type
On the X Axis -  Sum of number of farms , Count of Animal Type, count of number of farmers breaches, count of farms breaches occurred upon.
Table is only for the breaches, there are other farmers who exist but are not on this list.


I cannot seem to get a breakdown of the number of farmers breaching or the total  number of breaches Animal Type cateorgy. It aggregates the total in each category so 12 would appear for farm manager breaches and 14 for total breaches in each Animal Type.

Sum of number of farms and Count of Animal Type are fine as I'm pulling these from another area.

 

ExampleExample
The frustrating thing is I previously had the visual working, maybe by chance, I don't believe I used any measures. Happy to get advice to fix with or without Dax. First image shows in orange and purple the figures aggregrating while second image is correct (colours mixed up). 

How it is appearing. Sorry colours are mixed up from first image. Orange and purple incorrect hereHow it is appearing. Sorry colours are mixed up from first image. Orange and purple incorrect hereHow I'd like to appearHow I'd like to appear
 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Liamp , do you need distinctcount and you are using count in the visual?

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
Liamp
Regular Visitor

Sorry this was a silly error I hadn't picked up and spent way too much time on. I hadn't made the connections between tables.

 

Apologies @amitchandak 

amitchandak
Super User
Super User

@Liamp , do you need distinctcount and you are using count in the visual?

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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