Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Class Sorting Order

Hi Genuises,

I got stuck in class sorting order

I have made a class like this below:

=SubField(Class(Due,$(vWidth)),'<=',1) & 'to' & SubField(Class(Due,$(vWidth)),'x <',2)

vWidth is the dynamic variable which I am taking from input box

and I am using the above class function as dimension and my expression is Sum(AmCurrLocal)

The dimension is  come like 0 to 30, 60 to 90 , 30 to 60 and so on

But its not in a sorted order

Please help me to get it sorted

I have to submit this in 4 hours

Pls pls help me

Thanks in advance

Shashank

8 Replies
MK_QSL
MVP
MVP

Go to SORT tab

Sort Your Aggregated Dimension by Numeric Value - Ascending Order

Rest all should be UNTICK

Anonymous
Not applicable
Author

It's not working

Anonymous
Not applicable
Author

I have a similar problem that I haven't figured out myself.  If anyone can figure this out it would be much appreciated.

BUMP

Image 1.png

Gysbert_Wassenaar

The class function returns values with both a text format and a numeric value. So the results of the class function can be sorted by Numeric Value - Ascending. What you folks are doing is creating a pure text value by using the subfield or replace functions on the result of the class function. The resulting text values cannot be sorted numerically. What you could do is create a dual value again using the dual function: dual( subfield_expression_here , class_expression_here )


talk is cheap, supply exceeds demand
MK_QSL
MVP
MVP

Try Text - Sort A-Z

Anonymous
Not applicable
Author

It worked!  Thanks!

Image 1.png

Anonymous
Not applicable
Author

Try:

=dual(replace(Class(Due,$(vWidth)),'<= x <','to'),Class(Due,$(vWidth)))

Then sort by Numerical Value

PaulVanSiclen
Employee
Employee

Thanks Michael, this worked perfectly in my Qlik Sense app!