Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm trying to achieve complex Sorting but not able to do so in Sort Expression.
What I want is High to Low Sorting but it has some conditions:
Sort in descending order but if there are same values before decimal like 4.112, 4.111 & 4.113 than Sort it in Ascending order like this 4.111, 4.112 & 4.113
This is what I want:
Regards,
Eric
You could try something like this as sort-expression:
rangesum(floor(Score), 1-frac(Score))
- Marcus
@erric3210 Are you using QlikView or Qlik Sense? I would like to move this into the correct product forum. This is generally used for non-product related discussions.
Hi Ma'am,
I'm using Qlikview. Thank you so much. Appreciate that help.
Regards,
Eric
You could try something like this as sort-expression:
rangesum(floor(Score), 1-frac(Score))
- Marcus
Hi Marcus Sir,
This is exactly what I want. Your solution worked in my case.
Regards,
Eric
What's the problem? From a sorting point of view it should equally work if there are 3 or 4 or even more digits. If the different lengths are troubling you may cut them with round(Score, 0.001) or you used a formatting to show only the wanted number of digits - whereby you could show less as exists or more, like:
num(Score, '#.00') respectively num(Score, '#.00000')
The exact format-pattern for num() depends on the used number-formatting in your application.
- Marcus
Thanks again Marcus. That was logical. I got it.
Regards,
Eric