Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ishanahiya
Contributor
Contributor

Last 25 records with data

I can load the first 25 records from the ModifiedDate field with this script

First 25
Load
ModifiedDate

from DateWorksheet.csv;

However instead, I want to load the last 25 records with data from the ModifiedDate field so empty records are excluded. Can you help?

1 Solution

Accepted Solutions
jonathandienst

If you are loading from a CSV, you probably cant avoid loading all the date first to do this. Something like this:

 

T_Data:
LOAD *, RowNo() as RowID
FROM <your data source>
WHERE Len(ModifiedDate) > 0;

Let zRowCount = Peek('RowID');

Data:
NoConcatenate
LOAD * 
Resident 
WHERE RowID >= $(zRowCount) - 25;

DROP Table T_Data;

 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

1 Reply
jonathandienst

If you are loading from a CSV, you probably cant avoid loading all the date first to do this. Something like this:

 

T_Data:
LOAD *, RowNo() as RowID
FROM <your data source>
WHERE Len(ModifiedDate) > 0;

Let zRowCount = Peek('RowID');

Data:
NoConcatenate
LOAD * 
Resident 
WHERE RowID >= $(zRowCount) - 25;

DROP Table T_Data;

 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post