Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
jyothish8807
Master II
Master II

Using count function

Hi,

I want to count the no of times , two condition are fulfilling for a particular person.

for eg. there are two coloums named " Status" and "Approved " corresponding to different persons.

I want the count coresponding to different persons when status="Done" and Approved="Yes"

iam using the following syntex:

count(if(status='Done' and Approved='Yes',,))

but its not working.....

Regards

Jyothish

Best Regards,
KC
6 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try this.

     Count({<Status = {"DONE"}, Approved= {"YES"}>} PERSON_ID)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable

hi kaushik

can u plz explain me the syntax you wrote

i have similar problem

thanks in advance

Not applicable

hi kaushik

can u plz explain me the syntax you wrote

i have similar problem

thanks in advance

Not applicable

could u explain me the syntax.

i have similar problem

thanks in advance

deepakqlikview_123
Specialist
Specialist

Hi,

Count({<Status = {"DONE"}, Approved= {"YES"}>} PERSON_ID)

in a a above expression  Kaushik used set analysis.

This expression is counting PERSON_ID only where status is done and approved is YES that u r trying for.

Thanks

jyothish8807
Master II
Master II
Author

Over here Kaushik is using set analysis.

Count function counts the no of possible outcomes.

Set analysis always start with "{" and finish with "}".In "<" you have to write the condition you want.

In the above syntex he is chacking for the entries whose status="Done" and Approved="Yes". He has grouped these condition to Person ID. So now count function will count all the Person_ID which fullfill both status and Approved condition.

Hope this helps you.

Reards

Jyothish KC

Best Regards,
KC