Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How do you create an expression to get a count of last timestamp of ID for each LEVEL and RISK from the table below?
TIMESTAMP | ID | LEVEL | RISK |
---|---|---|---|
7/23/2012 | 1264 | 9 | 6 |
7/24/2012 | 1288 | 9 | 5 |
7/24/2012 | 1357 | 2 | 6 |
7/24/2012 | 1357 | 2 | 6 |
7/24/2012 | 1833 | 1 | 6 |
7/25/2012 | 1366 | 2 | 6 |
7/26/2012 | 1222 | 9 | 4 |
7/27/2012 | 1222 | 3 | 6 |
7/28/2012 | 2889 | 2 | 6 |
7/30/2012 | 2889 | 2 | 6 |
7/31/2012 | 6777 | 2 | 6 |
I would expect to get the following counts:
LEVEL=1 RISK=6 ====> COUNT=1
LEVEL=2 RISK=6 ====> COUNT=4
etc...
try:
count(aggr(max(TIMESTAMP),ID,LEVEL,RISK))
I need to add one more step, how would I update this expression if I wanted to count only if LEVEL=2?
try: count(aggr(max({$<[LEVEL]={'2'}>} TIMESTAMP),ID,LEVEL,RISK))
Thank you this works now!
Thank you this works now!
Thank you this works now!