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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to define custom sort in Qlik Sense?

I have a field [Payment Timing] storing values from -200 to 200. [Payment Timing] is to be used as the dimension of a bar chart.

In order to group the extreme values together, I have set the dimension to be

=If([Payment Timing]<-9,'<-9',If([Payment Timing]>9,'>9',[Payment Timing])) 

However, if I sort the dimension based on [Payment Timing], '<-9' and '>9' will appear in the middle of the axis, which they should appear at the left and and right end respectively.

I learn from other websites that I can define the sort order in the load script like this:

PaymengTiming_Sort:

Load * Inline

[

Payment Timing,

<-9

-9

-8

-7

-6

-5

-4

-3

-2

-1

0

1

2

3

4

5

6

7

8

9

>9

];

But this failed to load.

May I know how should I modify my script, or Qlik Sense does not support this?

1 Reply
sunny_talwar

I just tried it and it runs without any issues.... Can you share the error you are seeing?

PaymengTiming_Sort:

Load * Inline

[

Payment Timing

<-9

-9

-8

-7

-6

-5

-4

-3

-2

-1

0

1

2

3

4

5

6

7

8

9

>9

];