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
bobbob123
Helper III
Helper III

Conditionally Format Column Chart

Hi,

 

I am currently working with an unstructured dataset that looks like this.

bobbob123_1-1672009162290.png

 

It basically shows the year, the different subjects (A,B,C) and the number of students obtaining the marks 50-60 at school and state level. The data is to be read in rows. 

 

Eg Subject A, 1 student got a mark of 52 at school level where as 123 students got the same mark at state level.

 

I want to create a custom column chart where it has the marks (50-60) on the x-axis. The number of students on the y-axis. The column chart is to display data of students at state level however, where there are students obtaining the same marks at school level it must show that "bar" as a different colour.  See Image below for desired results for subject A visual

 

bobbob123_2-1672009475026.png

 

As I hover over the score 52 and 55, I can see there were 1 and 4 students who recieved the same mark. Obviously, will need slicers namely in subjects and year.

 

I'm able to do this in excel, but can't seem to figure it out on Power Query/Power BI.

 

Any help/direction is greatly appreciated.

 

 

 

1 ACCEPTED SOLUTION

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

Share data in a format that can be pasted in an MS Excel file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish,

 

Here you go.

 

2022Subject A5051525354555657585960
2022School  1  4 5 8 
2022State235116123979257807651224932330797
2022Subject B5051525354555657585960
2022School10  3 6 4 1 
2022State92891836219159642794249164646201
2022Subject C5051525354555657585960
2022School13 56   8  9
2022State11382272787378917880494303134259

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi, 

 

Thank you for your response.

 

This is a column and line graph, i need the visual to be a column graph only. Where there is an overlap with schools and state, the "column" will be displayed a different colour. I've attached an image in my post for reference.

You are welcome.  You can convert it to any visual you want.  If you convert it to a Column chart then the School portion of the column will not even be visible because of the magnitude of difference with the State numbers.  


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
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.