Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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;
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
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.
HI,
If I wanted to GET THIS CHART being loaded?
NAME | SALES |
G | 200 |
C | 45 |
F | 32 |
E | 21 |
A | 20 |
D | 20 |
B | 10 |
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 :
Name | Sales | X |
---|---|---|
G | 200 | 1 |
C | 45 | 2 |
F | 32 | 3 |
E | 21 | 4 |
A | 20 | 5 |
D | 20 | 6 |
B | 10 | 7 |