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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
sraj
Responsive Resident
Responsive Resident

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 7
v-xiaotang
Community Support
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.

v-xiaotang
Community Support
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
Responsive Resident
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.  

 Analytics.PNG

 

 

Hi @sraj 

Thanks for your reply, you can try this,

 

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

 

vxiaotang_1-1636103340783.png
vxiaotang_0-1636103330021.png

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

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

vxiaotang_0-1637740166069.png

 

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
Responsive Resident
Responsive Resident

Ok, my actual names are two columns...last name and first name sorry that I didnt mention it earlier in my example.  I tried both Status 1 & Status 2 measure, for status 1 I used exactly like what you have and for status 2 I used the last name and employee staus in your example.  But this is what I see, the status 1 & status 2 card shows the measure you provided, the empty one in the center is the Hanson measure I have above which is showing blank...and the TERMINATED is the actual employee status which is the regular column. The 2nd print screen shows an active employees status.

 

Analytics.PNG

 

Analytics.PNG

Hi @sraj 

Thanks for your reply.

 

Yes, it only judges 'Table'[Column1] in measure Status2. So if your actual name have 2 columns, the measure Status2 will not work.

Does measure Status1 work OK? Is there anything I can help? 

 

 

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.

jaideepnema
Solution Sage
Solution Sage

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

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.