cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
vkomarag Helper III
Helper III

Individual and Cumulative in a single visual

Hi

 

For example on employee table, I need to show the number of employees in each department as well as total employees in a single visual.

 

I am able to do it in different visuals and keep side by side. Just checking if there is any possibility to keep them in a single visual.

 

Thanks

KVB

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft v-huizhn-msft
Microsoft

Re: Individual and Cumulative in a single visual


Hi @vkomarag,

You can create two measure using the formula.

Department = COUNTA(Table1[Employee])
Total = CALCULATE ( COUNTA ( Table1[Employee] ), ALL (Table1 ) )

And select them as value field in bar chart. Please see the following screenshot, I use Cluster column chart, if you want to other bar chart, you can change it.

1.PNG

Thanks,
Angelia

View solution in original post

5 REPLIES 5

Re: Individual and Cumulative in a single visual

Hi there,

 

You should be able to create a measure that concatenates two values. One for the total count of that column, and one for the count of rows of that department. It could look something like this:

 

Count of Employees

=COUNTA(Table[EmployeeID])

 

Count of ALL Employees

=
CALCULATE ( COUNTA ( Table[EmployeeID] ), ALL ( Table ) )

 

Concatenated Values

=
[Count of Employees] & " / " & [Count of ALL Employees] 

 

You can this use this on a single card style or other visual. Hope this helps! 

Microsoft dkay84_PowerBI
Microsoft

Re: Individual and Cumulative in a single visual

You can also use Tooltips to display the total on hover, where the actual components of the visual (i.e. columns or bars) show the value per department.  Lastly, you can use a stacked column with department as legend to visually show the total (height of column) and breakdown by department (colors).

Microsoft v-huizhn-msft
Microsoft

Re: Individual and Cumulative in a single visual

Hi @vkomarag,

After test using the solution @dkay84_PowerBI posted using the following sample table.

1.PNG

Then you get expected result.

2.PNG

If you still have problem, please share your sample data for further analysis.

Best Regards,
Angelia

vkomarag Helper III
Helper III

Re: Individual and Cumulative in a single visual

Actually I need it in a bar chart in vertical representation.

Microsoft v-huizhn-msft
Microsoft

Re: Individual and Cumulative in a single visual


Hi @vkomarag,

You can create two measure using the formula.

Department = COUNTA(Table1[Employee])
Total = CALCULATE ( COUNTA ( Table1[Employee] ), ALL (Table1 ) )

And select them as value field in bar chart. Please see the following screenshot, I use Cluster column chart, if you want to other bar chart, you can change it.

1.PNG

Thanks,
Angelia

View solution in original post

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors