Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count if with 2 conditional

dear all

how are u today, now i have some problem, if u have time, would u like to help me, thanks

current , i have data

name       joindate        termindate   status

rika sang 2010-12-12  2014-12-12  In-Active

andrias    2011-12-12  2014-12-12 In-Active

anita        2012-12-12  2014-12-12 In-Active

ambra      2010-12-12  2013-12-12 In-Active

andrian    2014-12-12  null               Active

so i want to know about Using 2 conditional ( date and Status)

1. count joindate person every year

2. count termindate person every year

i using this code  for item (2) --> count({<[e_status]={'In-Active'}>} e_status )

- but i want to using 2 condition, is termindate. i don't know , how to write in expression

would u like to helpme

thanks

15 Replies
Not applicable
Author

no, i don't

Not applicable
Author

i 'll try, thanks

Not applicable
Author

Not applicable
Author

Hire:

count({<[e_status]={'Active'}, Year={2014}>} name)

Terminate:

count({<[e_status]={'In-Active'}, Year={2014}>} name)

about Hire

how know , if i want to know count join date, maybe one of person in this year (2014), has resigned

( based on my data)

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Script:

Data:

LOAD

name,

joindate AS Date,

Year(joindate) AS Year,

status

FROM DataSource

WHERE status = 'Active';


Concatenate(Data)

LOAD

name,

termindate AS Date,

Year(termindate) AS Year,

status,

joindate

FROM DataSource

WHERE status = 'In-Active';



Regards,

Jagan.

Not applicable
Author

i try and success, thanks