Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
wuming79
Creator
Creator

Qlikesense: How do I load the last x rows in data load editor?

Hi,

How do I load the last 100 rows of a particular field example datetime below?

Example:

[MyTable]:
LOAD data AS data1, 
     timestamp((timestamp/86400 + 25569 + 8/24),'DD/MM/YYYY h:mm:ss[.fff] TT') as datetime;
       
SELECT `data`, 
	`timestamp`, 
FROM myDB.`myTable`;

 

 

Labels (1)
1 Solution

Accepted Solutions
Anil_Babu_Samineni

Try this?

[MyTable]:
LOAD data AS data1, 
     timestamp((timestamp/86400 + 25569 + 8/24),'DD/MM/YYYY h:mm:ss[.fff] TT') as datetime;
       
SELECT `data`, 
	`timestamp`, 
FROM myDB.`myTable`;

Final:
NoConcatenate
First 100 Load * Resident MyTable order by data1 asc, datetime asc;

Drop Table MyTable;
Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

5 Replies
Anil_Babu_Samineni

Try this?

[MyTable]:
LOAD data AS data1, 
     timestamp((timestamp/86400 + 25569 + 8/24),'DD/MM/YYYY h:mm:ss[.fff] TT') as datetime;
       
SELECT `data`, 
	`timestamp`, 
FROM myDB.`myTable`;

Final:
NoConcatenate
First 100 Load * Resident MyTable order by data1 asc, datetime asc;

Drop Table MyTable;
Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
wuming79
Creator
Creator
Author

Hi,

Do I need to order by data1 asc too? I just want to order by datetime.  

I tried to order by only date time but am getting the first 100 loads. 

 

 

Anil_Babu_Samineni

Not sure, Why you are not simply copy paste and check? First take that as priority, If still problem we may ask sample application.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
wuming79
Creator
Creator
Author

Hi, 

Sorry,  the date was still wrong.  

Using the exact syntax as above and using the "Final" table to see the datetime data, I have datetime from 2018-10-10 10:00:00 to 2018-10-11 21:00:00. 

The expected date should be from 2018-11-14 04:00:00 to 2018-11-14 16:00:00.

 

 

Anil_Babu_Samineni

that means, below one is not working.

Timestamp((timestamp/86400 + 25569 + 8/24),'DD/MM/YYYY h:mm:ss[.fff] TT') as datetime; 

 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful