Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I load two fields with IDs: id1 and id2. Each of the fields also has date dimension (date1 and date2) associated with them. I need to write an expression that given the current date1 and date2 selection will count number of IDs that are in both ID fields. I could also use an expression that finds the difference between the fields, i.e. IDs that are in id1, but not in id2.
If the above is unclear, here is an example.
date1 | id1 |
---|---|
11/19/2011 | 1 |
11/19/2011 | 2 |
11/19/2011 | 3 |
11/19/2011 | 4 |
11/20/2011 | 5 |
11/20/2011 | 9 |
date2 | id2 |
---|---|
11/23/2011 | 1 |
11/23/2011 | 3 |
11/23/2011 | 4 |
11/23/2011 | 7 |
11/23/2011 | 8 |
11/25/2011 | 9 |
In the list box for date1 I select "11/19/2011", which leaves IDs {1, 2, 3, 4} in id1. In the list box for date2 I select "11/23/2011", which leaves IDs {1, 3, 4, 7, 8} in id2. I need expressions that will return 3 as the number of IDs present in both fields ({1, 3, 4}) and 1 as the number of IDs present in id1, but not present in id2 ({2}).
Try
=count({<id1 *= p(id2)>} id1)
and
=count({<id1 /= p(id2)>} id1)
Regards,
Stefan
Try
=count({<id1 *= p(id2)>} id1)
and
=count({<id1 /= p(id2)>} id1)
Regards,
Stefan
Thanks, worked like a charm!