Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

[HELP] Compare two datasets to calculate participation rate

I have two sets of data. For example:

  1. Staff List (1000 staff)

  2. Participation list (800 staff)

These two lists have common fields. For example:

  1. Staff ID

  2. Department

I want to create a 100% stacked bar chart showing participation rates by department, for example:

  1. Finance - 80%

  2. Operations - 100%

  3. Audit - 99%

  4. HR - 45%

How do I do this?

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

Hi, @Anonymous 

According to your description and sample pictures, I can clearly understand what you want to get, I think you can achieve this using measure and clustered bar chart. You can try my steps:

This is my test data based on your sample picture:

v-robertq-msft_0-1610961723998.png

  1. I created a measure and set the measure format to “Percentage” in the Measure Tool, like this:
Percentage =

var _Countofparticipation=

COUNTX(FILTER('Table',[Staff ID (Participation list)]<>BLANK()),[Staff ID (Participation list)] )

var _Countofall =

COUNTX('Table',[Staff ID (Staff list)])

return

DIVIDE(_Countofparticipation,_Countofall)

v-robertq-msft_1-1610961724020.png

  1. Then I created a clustered bar chart and place it like this:

v-robertq-msft_2-1610961724078.png

 

And you can get what you want.

You can download my test pbix file here

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-robertq-msft
Community Support
Community Support

Hi, @Anonymous 

According to your description and sample pictures, I can clearly understand what you want to get, I think you can achieve this using measure and clustered bar chart. You can try my steps:

This is my test data based on your sample picture:

v-robertq-msft_0-1610961723998.png

  1. I created a measure and set the measure format to “Percentage” in the Measure Tool, like this:
Percentage =

var _Countofparticipation=

COUNTX(FILTER('Table',[Staff ID (Participation list)]<>BLANK()),[Staff ID (Participation list)] )

var _Countofall =

COUNTX('Table',[Staff ID (Staff list)])

return

DIVIDE(_Countofparticipation,_Countofall)

v-robertq-msft_1-1610961724020.png

  1. Then I created a clustered bar chart and place it like this:

v-robertq-msft_2-1610961724078.png

 

And you can get what you want.

You can download my test pbix file here

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

PC2790
Community Champion
Community Champion

Hi @Anonymous ,

 

For 100% Stacked bar chart, you would have to select Department in the Axis section and participation rates in the values.

If you don't have the participation rates already, you need to create a measure to calculate it.

The graph would look something like this:

PC2790_0-1610683145039.png

 

But looking at your expected outcome, I would see you go with Stacked bar chart and change the measure as percentage if not already it is. Please refer the below:

 

PC2790_1-1610683370858.pngPC2790_2-1610683401893.png

See if it satisfies your requirement.

 

If you found the answer interesting, please provide a Kudos.

Mark it as solution if it helped you solve your query. 

Anonymous
Not applicable

Thanks for the reply.

 

The confusion Im having is how do I use relationships to tie the unique staff IDs from the two datasets together.

 

For example:

pbicylim_1-1610683887841.png

 

 

Based on the example above, I want to get a graph showing:

pbicylim_2-1610683961165.png

 

 How do i do this?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors