Forum Discussion

bobbob123's avatar
bobbob123
Helper III
3 years ago
Solved

Conditionally Format Column Chart

Hi,

 

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

 

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

 

 

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.

 

 

 

5 Replies

    • bobbob123's avatar
      bobbob123
      Helper III

      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