Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Help with sort order

Hi all,

I am having trouble getting a sort order correct to a clients needs.

I have the following sort orders in the script.

LOAD * INLINE[
Bill_Class_Model,Sort_Order1
U,1
A,2
M,3
]
;
LOAD * INLINE[
Account_Det_ID_Model,Sort_Order2
DU,1
CU,2
CM,3

DM,4
]
;

What they want is if Bill_Class_Model = M then Sort_Order2 needs to be sorted in descending order otherwise sort in ascending order.

Can anyone help please?

11 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Sorry, my mistake. Should be

LOAD Dual(Bill_Class_Model, Sort_Order1) As Bill_Class_Model INLINE

and

LOAD Dual(Account_Det_ID_Model, Sort_Order2) As Account_Det_ID_Model INLINE

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Thanks Jonathan, that loaded sucessfully but it didn't give what i was looking for.. see attachment.