Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Load Order by

not working properly.
not order the table.

can you help me?

temp1:
LOAD * INLINE [
Name, Sales
A,20
B, 10
C,45
D,20
E, 21
F,32
G,200
];

temp:
noconcatenate Load
Name,sum(Sales) as Sales
Resident temp1
group by Name
Order by Sales desc,Name;
Drop Table temp1;

4 Replies
Highlighted
Not applicable

Hi AndreaPeretti,

I can't find 'Order desc' field ......

Order by Sales desc,Name;

Anyway, you can sort data in chart level also.........

Regards,

Nilupa

Highlighted
Master
Master

order by is a clause used for sorting the records of a resident input table before they are processed by the load statement. The resident table can be sorted by one or more fields in ascending or descending order. The sorting is made primarily by numeric value and secondarily by national ASCII value. This clause may only be used when the data source is a resident table.

field specifies which field the resident table is sorted by. The field can be specified by its name or by its number in the resident table (the first field is number 1).

sortorder is either asc for ascending or desc for descending. If no sortorder is specified, asc is assumed.

Note: If no source of data is given by means of a from, inline, resident or autogenerate clause, data will be loaded from the result of the immediately succeeding select or load statement. The succeeding statement should not have a prefix.

Highlighted
Not applicable

HI,

If I wanted to GET THIS CHART being loaded?

NAMESALES
G200
C45
F32
E21
A20
D20
B10
Highlighted
Not applicable

it is working properly you couldnt see that Beacuse you are probably trying to see that effect on the table box or another object.

QlikView automatically analyzing your data and decide automatically what kind sorting is suitable also you can change ...

if you really want to trust that statements you should try that script and then sort by X . Im just giving recno so first value shoul be 200 ... ;


temp1:
LOAD * INLINE [
Name, Sales
A,20
B, 10
C,45
D,20
E, 21
F,32
G,200
];

temp:
noconcatenate Load *,recNo() as X
Resident temp1
Order by Sales desc,Name;
Drop Table temp1;


Output :

NameSalesX
G2001
C452
F323
E214
A205
D206
B107