Forum Discussion
user900
3 years agoHelper II
Chart Help
I have a data file that shows User Name, Status and Department. Using the stacked bar chart, I'm showing the Department on the Y-Axis, count of Users on the X-Axis and Status as legend. I need to also show a bar for the Enterprise, which essentially adds up the data for all departments.
Any help would be appreciated.
| User | Department |
| (16 names) | A |
| (4 names) | B |
| (20 names) | Enterprise (this is what I need, but there is not a row in the data to show this |
11 Replies
- MFelixSuper User
Hi user900 ,
Don't know how you have the enterprise or if it's more than one but assuming it's only create a tabl with the departments and a row saying enterprise:
Now add the following measure:
Total values = SWITCH( SELECTEDVALUE(Department[Department]), "Enterprise", COUNTROWS(Users), COUNTROWS( FILTER(Users, Users[Department] in VALUES(Department[Department]) ) ) )Nowuse the measure and the new table values to do your chart. If you want you can add an additional column to your new table for sorting the departments and have the enterprise at the bottom of the chart.