Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

join in set analysis

Hi,

I'm trying to make a join in a set analysis.

For example, i've 2 tables:

T1:

id_t1code_t1
1100
2200
3300
4400

T2:

id_t2code_t2
1200
2500
3300
4600

I need to count the rows where there are a match between code_t1 and code_t2, here 2 rows.

I try this but without success:

count(DISTINCT  {<code_t1=P(code_t2)>} id_t1)

I can't rename the column to make an association.

thanks for your help

1 Solution

Accepted Solutions
Gysbert_Wassenaar

This one works for me: =count( {<code_t1=p([code_t2])>} DISTINCT id_t1)

Not a set analysis expression, but it returns the correct count too: =count(DISTINCT  if(code_t1=code_t2, id_t1))


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Not applicable
Author

I tryied the next proposition:

count(DISTINCT  {<code_t1={'=code_t1=code_t2'}>} id_t1)

unfortunately without success, i've no data to display as result

Gysbert_Wassenaar

This one works for me: =count( {<code_t1=p([code_t2])>} DISTINCT id_t1)

Not a set analysis expression, but it returns the correct count too: =count(DISTINCT  if(code_t1=code_t2, id_t1))


talk is cheap, supply exceeds demand
Not applicable
Author

Your solution was good:

=count(DISTINCT  if(code_t1=code_t2, id_t1))

thanks