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 explain it better. 

 

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?

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

3 Replies

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

     

    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.

    • Krcmajster's avatar
      Krcmajster
      Helper IV

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

       

      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's avatar
        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"))

        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.