Forum Discussion

sraj's avatar
sraj
Responsive Resident
4 years ago

Employee Status

Hi everyone,
 
I am using this measure to pull active and inactive employees, for some reason only the ACTIVE employee status is showing when I pick the employee...the employees inactive or termed dont show their status.  Can someone please advise on this?
 
Emp Status = IF(HASONEVALUE(kro_PAY_TRANSACTIONS[EmployeeStatus]), MIN(kro_PAY_TRANSACTIONS[EmployeeStatus]), "" )
 
Thanks,
Seema Rajan.

7 Replies

  • Hi sraj ,
    this is difficult to check without data. Is it possible for you to share a sample pbix with sensitive data removed ?

     

     

  • v-xiaotang's avatar
    v-xiaotang
    Community Support

    Hi sraj 

    Thanks for reaching out to us.

     

    With the measure, it's not enough to find the reason. Could you share sample data in text? e.g.

    EmployeeName EmployeeStatus
    name1 ACTIVE 
    name2 inactive 
    name3 termed 

    and post the result you want in picture or text.

     

    Best Regards,

    Community Support Team _Tang

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

    • sraj's avatar
      sraj
      Responsive Resident

      Hi there - the main reason I had this calculation was to show the employee status only when an employee is selected...if you look at this picture below you will see that even if I dont select employee the first 

      'active' shows on the card. It works fine for active employees but when I use the above HANSON function and select an inactive employee the card is showing up as blank.  I hope this makes sense and

      would be able to help.  

       

       

       

      • v-xiaotang's avatar
        v-xiaotang
        Community Support

        Hi sraj 

        Thanks for your reply, you can try this,

         

        Status1 = SELECTEDVALUE('Table'[Column2])
        Status2 = IF(ISFILTERED('Table'[Column1]),MAX('Table'[Column2]))

         


        Or if the name are 2 columns, you can try this,

        Status3 = CALCULATE(MAX('TableNew'[status]),ALLSELECTED(TableNew))

         

        Best Regards,

        Community Support Team _ Tang

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

  • v-xiaotang's avatar
    v-xiaotang
    Community Support

    Hi sraj 

    Does my answer help? Would you like to accept my answer as solution to help others find it quickly? Thank you very much 🙂

     

    Best Regards,

    Community Support Team _Tang

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