Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Combined bar chart Stagged and Normal

Hi have data in the below fashion and I wasnt a bar chart to be displayed in this fashion.

Data

ABCMonths
506178Oct-20
405155Nov-20
453896Dec-20
554825Jan-21
655845Feb-21

 

 

 

First multi color chart represent 2 different category  A and B i:e 15 count for A and 19 count for B and single color chart represent count for C category

 

multi color bar chart represent count of two different category 19 for one category and 15 for other and another bar char in single color represent a different category

 

 

MFelix  Can you help ?

  • Hi Anonymous 

     

    This is possible using a disconnected table with some grouping and then using a measure for your calculation:

    Disconnected table:

     

    SELECTION VALUE = SWITCH(
                            SELECTEDVALUE('Grouping'[Cat]); 
                            "A"; SUM('Table'[A]);
                            "B";SUM('Table'[B]);
                            "C";SUM('Table'[C])
                            )

     

     

    Now create a Stacked column chart witrh the folllowing setup:

    • Axis:
      • Date Column
      • Group from the disconnected table
    • Legend
      • Cat from the disconected table
    • Values
      • Selection Value measure
    • Tur off concatenantion of the X-axis.

    Result below:

    If you want that the labels for grouping to be hidden just place a white rectangle on top and group both visualizations

     

    Check PBIX attach in October 2020 version (this has the rectangle in the layout).

     

     

4 Replies

  • Hi Anonymous 

     

    This is possible using a disconnected table with some grouping and then using a measure for your calculation:

    Disconnected table:

     

    SELECTION VALUE = SWITCH(
                            SELECTEDVALUE('Grouping'[Cat]); 
                            "A"; SUM('Table'[A]);
                            "B";SUM('Table'[B]);
                            "C";SUM('Table'[C])
                            )

     

     

    Now create a Stacked column chart witrh the folllowing setup:

    • Axis:
      • Date Column
      • Group from the disconnected table
    • Legend
      • Cat from the disconected table
    • Values
      • Selection Value measure
    • Tur off concatenantion of the X-axis.

    Result below:

    If you want that the labels for grouping to be hidden just place a white rectangle on top and group both visualizations

     

    Check PBIX attach in October 2020 version (this has the rectangle in the layout).

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Awesome !!

      that's what I needed :).

      Thanks a ton 🙂

      Arpit

  • Hi Anonymous ,

     

    There doesn't seem to be a direct way to achieve the formatting you have (A & B as stacked bar and C as normal bar) in a single visualization.

     

    However, you can use overlap 2 visualizations: 1st with Stacked bar having A & B while 2nd with normal bar having C.
    You will need to disable background color of the visualization which is in-front and then adjust the formatting such that they appear to be same visualization.

     

     

    Give a thumbs up if this post helped you in any way and mark this post as solution if it solved your query !!!

  • Anonymous , 

     

    Not clear, check if you are looking somrthing like this. If so please place A,B,C in Values field. 

     

     

    Regards, 

    Manikumar