Forum Discussion
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
| A | B | C | Months |
| 50 | 61 | 78 | Oct-20 |
| 40 | 51 | 55 | Nov-20 |
| 45 | 38 | 96 | Dec-20 |
| 55 | 48 | 25 | Jan-21 |
| 65 | 58 | 45 | Feb-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).
- Axis:
4 Replies
- MFelix
Super User
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).
- AnonymousNot applicable
Awesome !!
that's what I needed :).
Thanks a ton 🙂
Arpit
- Axis:
- Anand24
Super User
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 !!!
- manikumar34
Solution Sage
Anonymous ,
Not clear, check if you are looking somrthing like this. If so please place A,B,C in Values field.
Regards,
Manikumar