Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to make a join in a set analysis.
For example, i've 2 tables:
T1:
id_t1 | code_t1 |
---|---|
1 | 100 |
2 | 200 |
3 | 300 |
4 | 400 |
T2:
id_t2 | code_t2 |
---|---|
1 | 200 |
2 | 500 |
3 | 300 |
4 | 600 |
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
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))
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
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))
Your solution was good:
=count(DISTINCT if(code_t1=code_t2, id_t1))
thanks