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

Requirement on Sorting

Hi friends

i have to arrange the field values in This below order. and always zeros and null values should be in the bottom only.

Note: when we double click on Field then only field values changes from Ascending to Descending and  Descending to Ascending order

Ascending:

1

2

3

.

.

.500

0

0

0

.

.

.

Descending:

500

499

.

.

.

3

2

1

0

0

0

.

.

Thanks,

Siddik

8 Replies
sunny_talwar

Which object is this are we talking about?

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Abubakar,


As far as I am aware there is no way to find out whether the sort order on a column is Ascending or Descending at any given time.  This would be useful for putting together a sort expression.

What may work is a sort expression that turns zeros into nulls, as nulls always reside at the bottom of the sort order.

The required expression would be something like:

=if(FieldName = 0, null(), FieldName)

This needs to go in the Expression box on the Sort tab, with the tick box next to it checked.  Replace 'FieldName' with the name of the field you have in that column.

Hope that helps.

Steve

Not applicable
Author

Straight table

Not applicable
Author

Hi Steve Dark

I Have tried this expression but it is not working.

Not applicable
Author

sorry Steve Dark.now it is working

Thanks

Siddiq

sunny_talwar

Please close this thread by marking Steve's answer as correct.

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Excellent - thanks for the heads up.

Steve

Not applicable
Author

correct.