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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help

Hello All,

I want the count of enployee who whose Answer is Contact No and Email Id(Both)

ie ouput should be 5

VoteridQuestionAnswer
1Contact DetailsContact No
2Contact DetailsEmail ID
3Contact DetailsName
4Contact DetailsEmail ID
4Contact DetailsName
5Contact DetailsContact No
5Contact Details

Email ID

Regards,
priya

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this expression

=Count({<Voterid ={"=Count({<Answer ={'Contact No', 'Email ID'}>} DISTINCT Answer) =2"} >} Distinct Voterid )

Regards,

Jagan.

View solution in original post

9 Replies
nikhilgarg
Specialist II
Specialist II

Use the following Expression:

Count({<Answer = {'Contact No' , 'Email ID'}>}Answer)

Colin-Albert
Partner - Champion
Partner - Champion

You need to count the distinct Voterid's so the value returned is 1 for the two entries of Contact No and Email Id.

Count({<Answer = {'Contact No' , 'Email ID'}>} distinct Voterid)

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this expression

=Count({<Voterid ={"=Count({<Answer ={'Contact No', 'Email ID'}>} DISTINCT Answer) =2"} >} Distinct Voterid )

Regards,

Jagan.

mdmukramali
Specialist III
Specialist III

Dear ,

if you want to perform AND operation

use the below expression.

=Count(DISTINCT{<Voterid=p({1<Answer={'Contact No'}>})*p({1<Answer={'Email ID'}>} Voterid)>}Voterid)

Thanks,

Mukram

nikhilgarg
Specialist II
Specialist II

Hey ,

I didn't understand why you count Distinct Answer and equals to 2 ??

Cann't we do like :  Count({<Answer = {'Contact No' , 'Email ID'}>} distinct Voterid)

jagan
Partner - Champion III
Partner - Champion III

Hi Nikhil,

Here the concept is for each voterid, there should be both the entries 'Contact No' , 'Email ID'.

So only voterid 5 has both.

Regards,

Jagan.

nikhilgarg
Specialist II
Specialist II

HEy,

In your expression :

Count({<Answer ={'Contact No', 'Email ID'}>} DISTINCT Answer) will return 2. Ryt ??

then , what will below return :

<Voterid ={"=Count({<Answer ={'Contact No', 'Email ID'}>} DISTINCT Answer) =2"}>  ??


THanks

jagan
Partner - Champion III
Partner - Champion III

Hi,

If a voterid give 'Contact No', 'Email ID' answers then for that voter id we will get the count as 2. 

<Voterid ={"=Count({<Answer ={'Contact No', 'Email ID'}>} DISTINCT Answer) =2"}>


Here we are filtering the voterids who has given both 'Contact No', 'Email ID' (not any one) answers.


Regards,

Jagan.

nikhilgarg
Specialist II
Specialist II

Ok , Got it . But I didn't know that we can put set analysis like this also that on left side Field Name is there and right side Another field name to compare the value.

I usually put the analysis like:

On left side Filed Name and on right side either a numerical value or String.