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

sort order in pivot table

Hi,

How to sort the data as -3, +3, -8, +8 in this format in pivot table.

In my app calculated dimesion is  as follows : =if(Lens#=1,'-3',if(Lens#=2,'+3',if(Lens#=3,'-8','+8')))

Thanks in advance.

Regards,

Venkat

1 Solution

Accepted Solutions
Not applicable
Author

Hey,

You can sort by an expression.

Try sorting it by Lens#

gr.

Frank

View solution in original post

5 Replies
Not applicable
Author

Hey,

You can sort by an expression.

Try sorting it by Lens#

gr.

Frank

Not applicable
Author

hi, thanks for reply.

I tried but it is not getting correct order.

Thanks & Regards,

Venkat

sort.JPG

Not applicable
Author

Could you upload an example file?

Not applicable
Author

try this out in the sort settings by expression:

if(Lens#<0, Lens# * -1, Lens#)

It should solve your problem

regards,

MT

Not applicable
Author

Hi kbs,

Could u please explain ur Expression?

if(Lens#<0, Lens# * -1, Lens#)

Because It is fine with sorting, I don't know how it  works?

Please explain me.

Thanks in advance..

Regards,

Kabilan K.