Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
xarapre7
Creator II
Creator II

Get record of active employee

Hi!  I have employees in a table with 2 records.  1 is active and 1 is withdrawn.  What's the right expression to show in chart only the active record of the employee?

Example:

EMPLOYEE ID     STATUS              REGION        TEAM     

613                       WITHDRAWN     WEST            XYZ  

613                        ACTIVE             SOUTH          NULL

8 Replies
arulsettu
Master III
Master III

you can do in both ways

in calculated dimension

if(STATUS='ACTIVE',STATUS)

or

expression

ex:

sum(STATUS={'ACTIVE'}>}value)

Chanty4u
MVP
MVP

try simply

LOAD * INLINE [

    EMPLOYEE, STATUS, REGION, TEAM

    613, WITHDRAWN, WEST, XYZ

    613, ACTIVE, SOUTH, NULL

]

Where STATUS='ACTIVE';

act.PNG

xarapre7
Creator II
Creator II
Author

Thank you for your reply.

I need to have the 2 records' total of calls in the calculation.  So this should just be done at the text box level.

avinashelite

Did not get you ??

you want the active employee count ?

try like this

count (Distinct {<STATUS={'ACTIVE'}>}[EMPLOYEE ID])

xarapre7
Creator II
Creator II
Author

The below one is displaying the employee's withdrawn Team record.  I want to display his active record but, in the number of calls total, I need to have both the active and withdrawn records.  So, I just want to know how to display in here the employee's team record where his employment status is 'Active'.  The Active employee's team record should show a NULL instead of the CTS-CC1*

avinashelite

Sorry , I didn't understand ..could you please share your app and the desired output ? so that I could help you out with the same ?

xarapre7
Creator II
Creator II
Author

Okay.  Will share with you when I get to the office.  I'm about to leave now.

But, it's pretty much just want to display NULL (active record)  instead of the CTS-CC1 (inactive record) as Team in the textbox.

Thank you for your reply.  Later.

vishsaggi
Champion III
Champion III

In your Text object use

= Only({<STATUS = {'ACTIVE'}>} TEAM)

Does TEAM Fields has "CTS CC1" kind values?