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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
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)