Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikmeplease
Creator III
Creator III

Order By in Load

Hi,

I have the following data.

   

CONFIRMED_ATVLPLAWHO
29.11.201610:05:06007.189.A50529357
29.11.201610:05:06029.149.A50528122
29.11.201610:05:07005.010.A.0250528531
29.11.201610:05:07034.214.A50528440
29.11.201610:05:09008.210.A50523098
29.11.201610:05:10003.195.A50522899
29.11.201610:05:10026.203.A50522392
29.11.201610:05:10035.167.A50529279
29.11.201610:05:10046.131.A.1150523137
29.11.201610:05:11030.025.A.21

50528338

I want to load this data and then sort it.  I need it in the following format.

I want to have the time being sorted Ascending, and because the WHO repeats, it needs to be grouped by WHO.

Example of required result.

   

CONFIRMED_AT  VLPLAWHO
14.12.201607:40:06  009.221.A51623062
14.12.201607:40:25  009.219.A51623062
14.12.201607:40:56  009.211.A51623062
14.12.201607:41:40  009.181.A51623062
14.12.201607:41:59  009.176.A51623062
14.12.201607:42:52  009.160.A51623062
14.12.201607:43:20  009.151.A51623062
14.12.201607:43:59  009.117.A51623062
14.12.201607:45:10  010.071.A.0151623062
14.12.201607:45:59  010.070.A.0151623062
14.12.201607:46:48  010.078.A.0251623062

As can be seen above, Qlikview actually sorts it Ascending according to time, however it does not group all the WHO (OrderNumbers) together.  Can someone please assist?

I have been struggling getting ORDER BY to work correctly.  it seems to Ignore the Sort.

1 Solution

Accepted Solutions
qlikmeplease
Creator III
Creator III
Author

Hi , Just had to have the correct sequence in the ORDER BY and have it in a Resident. Thanks.  Solved it right after posting.

PRE:

LOAD VLPLA,

     right(WHO,8) as WHO,

     CONFIRMED_AT

NoConcatenate

Final:

load *

Resident PRE

Order BY WHO desc,CONFIRMED_AT,VLPLA,;

drop table PRE;

View solution in original post

2 Replies
vinieme12
Champion II
Champion II

Order by only works with Resident Load, can you post the script you are using?

qlikmeplease
Creator III
Creator III
Author

Hi , Just had to have the correct sequence in the ORDER BY and have it in a Resident. Thanks.  Solved it right after posting.

PRE:

LOAD VLPLA,

     right(WHO,8) as WHO,

     CONFIRMED_AT

NoConcatenate

Final:

load *

Resident PRE

Order BY WHO desc,CONFIRMED_AT,VLPLA,;

drop table PRE;

View solution in original post