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 al...
MFelix
3 years agoSuper 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.
user900
3 years agoHelper II
I created the new table and applied the suggested measure. When I pull the fields into the chart, the counts in each individual department is correct, but Enterprise is blank. I need it to total all the Users in all Departments. Here's what it looks like.