Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
hope this helps
How about this clause in your set expression?
ABC = {"*A*"}
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
hope this helps
Hi
What function can i use
If i want to count how many people in A
=count({<person={"=count(card)=1 and aggr(only(card),person)='A'"}>} person)
count({<[card]={'A'}>} card)
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