Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count from last timestamp?

How do you create an expression to get a count of last timestamp of ID for each LEVEL and RISK from the table below?

TIMESTAMPIDLEVELRISK
7/23/2012126496
7/24/2012128895
7/24/2012135726
7/24/2012135726
7/24/2012183316
7/25/2012136626
7/26/2012122294
7/27/2012122236
7/28/2012288926
7/30/2012288926
7/31/2012677726

I would expect to get the following counts:

LEVEL=1 RISK=6 ====> COUNT=1

LEVEL=2 RISK=6 ====> COUNT=4

etc...

6 Replies
Not applicable
Author

try:

count(aggr(max(TIMESTAMP),ID,LEVEL,RISK))

Not applicable
Author

I need to add one more step, how would I update this expression if I wanted to count only if LEVEL=2?

Gysbert_Wassenaar

try: count(aggr(max({$<[LEVEL]={'2'}>} TIMESTAMP),ID,LEVEL,RISK))


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you this works now!

Not applicable
Author

Thank you this works now!

Not applicable
Author

Thank you this works now!