Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlik_user3
Contributor II
Contributor II

conditional count

Hi all, I'm new in qlik.

I would like to count how many distinct user, where STATE is not FALSE and DATE is null, there are in the follow table. 

Can you help me please? 

example.JPG

1 Solution

Accepted Solutions
qlik_user3
Contributor II
Contributor II
Author

Hi Taoufiq, thank you so much for your answer. I try to do your code but it doesn't work.

I found another way and I have a solution.

There are two pictures, OK is my solution, ERROR it's your solution. Do you think that I make a mistake?

Thank you.

View solution in original post

5 Replies
MayilVahanan

Hi @qlik_user3 

Try like below

=Count({<STATE-={'FALSE'}, DATE={"=Len(Trim(DATE))=0"}>}DISTINCT USER)

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Taoufiq_Zarra

@qlik_user3  Maye be :

 

=count({<STATE={"*"}-{'FALSE'},USER={"=len(trim(DATE))=0"}>} distinct USER)

 

 

output:

Taoufiq_Zarra_0-1628159677145.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
qlik_user3
Contributor II
Contributor II
Author

I'm load an example, I wanto to find distinct user with STATE=IN PROGRESS and DATE=NULL. Maybe I make an error with date values.

Can you try with this file? Thank you 

Taoufiq_Zarra

@qlik_user3 

=count({<STATE={'IN PROGRESS'},ID={"=len(trim(DATE))=0"}>} distinct USER)

output:

Taoufiq_Zarra_0-1628166738835.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
qlik_user3
Contributor II
Contributor II
Author

Hi Taoufiq, thank you so much for your answer. I try to do your code but it doesn't work.

I found another way and I have a solution.

There are two pictures, OK is my solution, ERROR it's your solution. Do you think that I make a mistake?

Thank you.