Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

shirenmathai
New Contributor II

Set expression to find common records

Hi All,

Could you please someone help me to correct the set expression. I have two tables, on first table showing the groups and count of users. Second table showing the user details. Users can have multiple groups. If i select multiple groups on first table then users coming in common needs to show on user details table. For example in the attached application if i select group A,B,C then second table should show only the user 1 details.

Set expression used:-

if(getselectedcount(Group)>0,

count( distinct {<User={"=aggr(count(distinct Group),User)=getselectedcount(Group)"}>} User) ,

count(distinct User)

)

Users:

LOAD  * inline   [

User, Name

1, ABC

2, BCD

3, EFG

4, RTG

5, YUR

6, IOB

7, LIK

];

Matrix:

LOAD  * inline   [

Group,User

A,1

B,1

C,1

B,2

A,2

C,3

D,4

C,5

D,5

E,5

E,5

F,6

G,7

];

4 Replies

Re: Set expression to find common records

What is the problem... seems to be working... although a slight modification will make it slightly better

If(GetSelectedCount(Group) > 0, Count(DISTINCT {<User={"=Count(DISTINCT Group) = GetSelectedCount(Group)"}>} User), Count(DISTINCT User))


Capture.PNG

shirenmathai
New Contributor II

Re: Set expression to find common records

Thank you! .  But i don't need to add an extra column to second table using the set expression or on any other sheets objects. I need to filter all sheet objects based on the selected groups in first table.

Re: Set expression to find common records

May be omarbensalem‌ can help here to find you an extension which would trigger based on your condition needed

shirenmathai
New Contributor II

Re: Set expression to find common records

Thank you

Community Browser