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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Krcmajster
Helper IV
Helper IV

Custom bar chart visualization

I am looking into how to visualize certain data. I want to visualize how a certain universities are populated, how many studends they have they are populated by class. I attahced a picture that might explain it better. Capture.JPG

 

My issue is that I can only preset it for the whole university, e.g. UN1 can accept 2000 students and there are currently 1500 students,, something like above. However I want to make sort of stacked column chart that will also split this by classes. so for e.g. at UN1 there are 3 classes, Math, English, History. Math can accept 500 studnets and there are currently 400 assigned, English 1300 students and there are currently 1000 assigned and History can accept 200 students and there is currently 100 students assigned. 

 

Any suggestions?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Krcmajster ,

 

I'm using Stacked column chart and i created several Measures and added then to Value field of the visual to achieve the result as below.

EnglishFree = CALCULATE(SUM('Table'[capacity])-SUM('Table'[Occupied]),FILTER('Table','Table'[Class]="English"))

EnglishOccupied = CALCULATE(SUM('Table'[Occupied]),FILTER('Table','Table'[Class]="English"))

HistoryFree = CALCULATE(SUM('Table'[capacity])-SUM('Table'[Occupied]),FILTER('Table','Table'[Class]="History"))

HistoryOccupied = CALCULATE(SUM('Table'[Occupied]),FILTER('Table','Table'[Class]="History"))

MathFree = CALCULATE(SUM('Table'[capacity])-SUM('Table'[Occupied]),FILTER('Table','Table'[Class]="Math"))

MathOccupied = CALCULATE(SUM('Table'[Occupied]),FILTER('Table','Table'[Class]="Math"))

1.PNG

Pbix as attached.

 

Best Regards,

Jay

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Krcmajster ,

 

Which custom visual are you using? And what does your table structure look like?

I'm using Stacked column chart and i add University and Class to Axis. The result would be shown as below after i clicking the button at top-right of visual to move to the next hierarchy.

1.PNG

 

Best Regards,

Jay

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @Anonymous  but I need somehting more advance without drilldown.  Let me know if attahced picture makes more sense.

Capture.JPG

 

So Basically what you did just those stacked columns need to be stacked again.

 

I used Infographic Designer for the inital post but it really doesn't matter as long as it serves the purpose

Anonymous
Not applicable

Hi @Krcmajster ,

 

I'm using Stacked column chart and i created several Measures and added then to Value field of the visual to achieve the result as below.

EnglishFree = CALCULATE(SUM('Table'[capacity])-SUM('Table'[Occupied]),FILTER('Table','Table'[Class]="English"))

EnglishOccupied = CALCULATE(SUM('Table'[Occupied]),FILTER('Table','Table'[Class]="English"))

HistoryFree = CALCULATE(SUM('Table'[capacity])-SUM('Table'[Occupied]),FILTER('Table','Table'[Class]="History"))

HistoryOccupied = CALCULATE(SUM('Table'[Occupied]),FILTER('Table','Table'[Class]="History"))

MathFree = CALCULATE(SUM('Table'[capacity])-SUM('Table'[Occupied]),FILTER('Table','Table'[Class]="Math"))

MathOccupied = CALCULATE(SUM('Table'[Occupied]),FILTER('Table','Table'[Class]="Math"))

1.PNG

Pbix as attached.

 

Best Regards,

Jay

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.