Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

How to sort data in data load editor and assign order# in Qlik Sense

Hi experts,

I already have a table like below:

ItemRate1Rate2
A1.42.4
B9.10
C4.87.8
D10.51.1
E83.5
F3.98.2
G0.85.3
AA6.20
BB56
CC7.40
DD2.94
EE00



The ITEM could be ignored. I would like to sort the two fields separately and then assign order# from largest to smallest:

Order#Rate1Rate2
110.58.2
29.17.8
386
47.45.3
56.24
653.5
74.82.4
83.91.1
92.90
101.40
110.80
1200

Please let me know if it is doable. If yes, how?

I am actually looking for a multiple line chart without dimension(Basically draw sorted Rate1 and Rate2 in a line chart), but I cannot find a solution, so I come up with this workaround. If you also know how to draw lines without dimension, please let me know as well.

Thanks,

Jing

1 Solution

Accepted Solutions
MVP
MVP

Re: How to sort data in data load editor and assign order# in Qlik Sense

Maybe using this script:

SORTED:

LOAD Rate1, Recno() as [Order#]

RESIDENT YourTable

ORDER BY Rate1 DESC;

JOIN (SORTED)

LOAD Rate2, Recno() as [Order#]

RESIDENT YourTable

ORDER BY Rate2 DESC;

DROP TABLE YourTable;

2 Replies
MVP
MVP

Re: How to sort data in data load editor and assign order# in Qlik Sense

Maybe using this script:

SORTED:

LOAD Rate1, Recno() as [Order#]

RESIDENT YourTable

ORDER BY Rate1 DESC;

JOIN (SORTED)

LOAD Rate2, Recno() as [Order#]

RESIDENT YourTable

ORDER BY Rate2 DESC;

DROP TABLE YourTable;

Not applicable

Re: How to sort data in data load editor and assign order# in Qlik Sense

This works perfectly! Thanks a lot Swuehl!