Hi, I have a the following structure:
Contactid | Target | DATE |
---|
1 | A | 2000 |
2 |
| 2000 |
3 | B | 2000 |
4 | C | 2000 |
5 | A | 2000 |
1 |
| 2000 |
6 | C | 2000 |
2 |
| 2001 |
4 | B | 2001 |
5 |
| 2000 |
3 |
| 2000 |
4 |
| 2003 |
I am trying to get this using an expression :
count the number of Contact IDs for each target, like this :
IF A CONTACT HAS ONE TARGET COUNT ONLY THE 1ST NON EMPTY
IF A CONTACT HAS MANY TARGETS (ex: CONTACTID => 4) COUNT ONLY THE 1ST NON EMPTY WITH LATEST DATE
ALSO, I NEED TO COUNT Contact IDs WITH NO TARGET
so the results would be :
if i use only count(target) i'm getting this :
I am trying to get this done with Set analysis but no results :-((:
Thanks;