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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
bobbob123
Helper II
Helper II

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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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