Forum Discussion

Krcmajster's avatar
Krcmajster
Helper IV
6 years ago
Solved

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...
  • Anonymous's avatar
    Anonymous
    6 years ago

    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"))

    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.