cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nipius Regular Visitor
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 🙂

 

Incumbent Employee IDSuccessor Employee IDSuccessor GenderSuccessor ReadinessBalanced (ignoring readiness)Balanced (only looking at Ready Now)
001901FemaleReady NowNoYes
001902FemaleReady NowNoYes
001903MaleReady NowNoYes
001904MaleReady LaterNoYes
001905MaleReady LaterNoYes
002701FemaleReady NowYesYes
002702MaleReady NowYesYes
002703FemaleReady LaterYesYes

 

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
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] )
            && [Successor Readiness] = "Ready Now"
    )
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.

View solution in original post

3 REPLIES 3
Community Support Team
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] )
            && [Successor Readiness] = "Ready Now"
    )
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.

View solution in original post

Nipius Regular Visitor
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
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.

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

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

Difinity Conference

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

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors (Last 30 Days)