Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlik1_User1
Specialist
Specialist

Getting top 5 latest records (as per date)in chart

Hi All,

below is sample data, need to get the latest 5 records as per date in chart..i don't want to make use of back end scripting for this as i need all the records , only in this chart want to show top 5 records

ProductOrder dateSales
A12/12/201710
B10/10/201720
C1/2/201930
D10/17/201740
E10/27/201950
F1/3/202060
G4/4/201870
H5/12/201880
I7/10/202190
J5/11/2020100

 

Expected output

ProductOrder dateSales
I7/10/202190
J5/11/2020100
F1/3/202060
E10/27/201950
C1/2/201930
1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Hi,

Try this..

=sum({<[Order date]={"=rank(TOTAL [Order date])<=5"}>}Sales)

 

 

View solution in original post

5 Replies
settu_periasamy
Master III
Master III

Hi,

Try this..

=sum({<[Order date]={"=rank(TOTAL [Order date])<=5"}>}Sales)

 

 

Qlik1_User1
Specialist
Specialist
Author

@settu_periasamy thanks a lot, it worked 😀

Qlik1_User1
Specialist
Specialist
Author

@settu_periasamy,

can you please on below concern as well . Below is the link for query

https://community.qlik.com/t5/New-to-Qlik-Sense/Top-2-lastest-date-data/td-p/1676115

 

settu_periasamy
Master III
Master III

Hi,

It seems, that thread got removed.

But, your expression seems to be fine.

=sum({<[Order date]={"=rank([Order date])<=2"},Product={'A'}>}Sales)