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: 
a1020583
Partner - Contributor II
Partner - Contributor II

How to use qliksense set analysis to choose "A" card only

Hi guys,

i have some question about my data

ex.

there are three people Jay ,Frank, Peter

ABC represent  each of card kind

Jay : only A card

Frank : A,B card

Peter : A,B,C  card

i want to select who only have A card

regard ,

Jay

1 Solution

Accepted Solutions
ali_hijazi
Partner - Master II
Partner - Master II

suppose the following is your data:

load * Inline [

person, card

jay,A

frank,A

frank,B

peter,A

peter,B

peter,C

Elie,A

]

Create a pivot table with person as dimension

then use the following expression:

only({<person={"=count(card)=1 and only(card)='A'"}>} card)

then you will get your desired result

test_count.PNG

hope this helps

I can walk on water when it freezes

View solution in original post

6 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

How about this clause in your set expression?

ABC = {"*A*"}

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
ali_hijazi
Partner - Master II
Partner - Master II

suppose the following is your data:

load * Inline [

person, card

jay,A

frank,A

frank,B

peter,A

peter,B

peter,C

Elie,A

]

Create a pivot table with person as dimension

then use the following expression:

only({<person={"=count(card)=1 and only(card)='A'"}>} card)

then you will get your desired result

test_count.PNG

hope this helps

I can walk on water when it freezes
a1020583
Partner - Contributor II
Partner - Contributor II
Author

Hi

What function  can i use

If i want to count how many people in A

ali_hijazi
Partner - Master II
Partner - Master II

=count({<person={"=count(card)=1 and aggr(only(card),person)='A'"}>} person)

I can walk on water when it freezes
Anonymous
Not applicable

count({<[card]={'A'}>} card)

ali_hijazi
Partner - Master II
Partner - Master II

no this expressions counts all users who got A but Jay wants to count the persons who got only A i.e. 1 card and that card is A

I can walk on water when it freezes