Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
TomHolland
Contributor II
Contributor II

Sorting "empty" value last instead of first

I have 3 "values" to sort: "empty", REF and NRF.

I would like value "empty" to come first, REF second and NRF last:

67040 
67040REF
6740NRF

 

Qlikview however seems to put "empty" value Always last:

67040NRF
67040REF
6740 

 

or

67040REF
67040NRF
6740 

 

How can I solve this?

 

 

 

 

 

 

 

1 Solution

Accepted Solutions
jyothish8807
Master II
Master II

Hi Tom,

Try like this:

If you have a straight chart and the 'Field2' is having this values, then write the below in sort expression.

match({1}Field2,'','REF','NRF')

Best Regards,
KC

View solution in original post

4 Replies
jyothish8807
Master II
Master II

Hi Tom,

Try like this:

If you have a straight chart and the 'Field2' is having this values, then write the below in sort expression.

match({1}Field2,'','REF','NRF')

Best Regards,
KC
kjhertz
Partner - Creator
Partner - Creator

In the Chart properties Sort tab, try sorting by an expression that gives lower value for nulls for example:

sign(len([REF NRF FieldName]))

And also tick in:

Sort by "Text z-a"

 

 

 

TomHolland
Contributor II
Contributor II
Author

Hi KC,

I tried your suggestion.

At first it did not work.

But I added in loading script:

NULLASVALUE *;
SET NullValue ='';

and than I used your suggestion as follows:

match(Field2,'','REF','NRF')

This way it works the way I wanted!

Thanks,

Tom

 

 

TomHolland
Contributor II
Contributor II
Author

Hi Jonas,
I tried your suggestion, but I did not succeed in making it work.

Can be because I'm a beginner and not understanding everything yet.

Thanks for your suggestion.
Tom