cancel
Showing results for
Did you mean:
Regular Visitor

## Calculate if employee matches several requirements

Hi all!

I've been cracking my head over this for the past two days, without any luck. Hope you could help me out 🙂

The idea is that I have a file formatted like in the above table. It has incumbent employee ID's and then shows the gender and readiness of the possible successors. What I'd like to accomplish is to add two columns:

1. Showing the gender distribution as balanced (50% or above) or not, regardless of the readiness of the successors
2. Showing the gender distribution as balanced (50% or above) or not , only including the ready now successors.

Hope one of you could help me out. Any help is appreciated 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team

## Re: Calculate if employee matches several requirements

Hi @Nipius ,

We can create two calculated columns to meet your requirement:

``````Balanced (ignoring readiness) =
VAR t =
FILTER (
'Table',
[Incumbent Employee ID] = EARLIER ( [Incumbent Employee ID] )
)
RETURN
IF (
COUNTROWS ( FILTER ( t, [Successor Gender] = "Female" ) )
/ COUNTROWS ( t ) >= 0.5,
TRUE (),
FALSE ()
)``````

``````Balanced (only looking at Ready Now) =
VAR t =
FILTER (
'Table',
[Incumbent Employee ID] = EARLIER ( [Incumbent Employee ID] )
)
RETURN
IF (
COUNTROWS ( FILTER ( t, [Successor Gender] = "Female" ) )
/ COUNTROWS ( t ) >= 0.5,
TRUE (),
FALSE ()
)``````

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
Community Support Team

## Re: Calculate if employee matches several requirements

Hi @Nipius ,

We can create two calculated columns to meet your requirement:

``````Balanced (ignoring readiness) =
VAR t =
FILTER (
'Table',
[Incumbent Employee ID] = EARLIER ( [Incumbent Employee ID] )
)
RETURN
IF (
COUNTROWS ( FILTER ( t, [Successor Gender] = "Female" ) )
/ COUNTROWS ( t ) >= 0.5,
TRUE (),
FALSE ()
)``````

``````Balanced (only looking at Ready Now) =
VAR t =
FILTER (
'Table',
[Incumbent Employee ID] = EARLIER ( [Incumbent Employee ID] )
)
RETURN
IF (
COUNTROWS ( FILTER ( t, [Successor Gender] = "Female" ) )
/ COUNTROWS ( t ) >= 0.5,
TRUE (),
FALSE ()
)``````

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Regular Visitor

## Re: Calculate if employee matches several requirements

Thanks a ton, @v-lid-msft! Exactly what I was looking for. I'm happy to see I did use the right logic, but I wasn't able to translate this into the right code yet. Really appreciated 🙂

Highlighted
Community Support Team

## Re: Calculate if employee matches several requirements

Hi @Nipius ,

Have you successfully translated the code in my previous post into the right code you want?

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements

#### Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

#### Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

#### Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors (Last 30 Days)