Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rank, aggr?

I have one table there are the person_IDs and timestamps stored. I have created a new table there I give for every single person_ID a random number.

For my result I want to have an pivottable with the 3 person_IDs that has highest random number and for evey person_ID only 5 highest timestamps.

I attach the excel-file with example-data to illustrate it.

I hope someone could help me...

Liivi

Labels (1)
1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Two calculated dimensions.

=aggr(if(rank(Random)   <=3,Person_ID),Person_ID)
=aggr(if(rank(Timestamp)<=5,Timestamp),Person_ID,Timestamp)

See attached.

View solution in original post

2 Replies
johnw
Champion III
Champion III

Two calculated dimensions.

=aggr(if(rank(Random)   <=3,Person_ID),Person_ID)
=aggr(if(rank(Timestamp)<=5,Timestamp),Person_ID,Timestamp)

See attached.

Not applicable
Author

Thanx a lot!! It worked fine 🙂

Liivi