Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
How to sort data based on leading zeros and not the actual number in qlik
Below is my example
Item Num |
0064 |
000670402 |
0065FR |
CS-CD-PSW-10-00 |
010240410 |
The data should be sorted based on number of zeros at the start in ascending order.
My final output should be like the below table
Item Num |
000670402 |
0064 |
0065FR |
010240410 |
CS-CD-PSW-10-00 |
Note : This is just an example . I have more that 30000 item numbers like this and i want to sort based on number of leading zeros
Have you try to disable the sort by numeric and have only the sort by alphabetically on?
load len(PurgeChar(field,123456789)) as ZeroLength,field;
load * Inline [
field
001234
12008750
000765
];
use ZeroLength field for sorting
Yes I have tried . But its not working as expected
I have tried this. But not getting desired output
You may try it with the following as sort-index:
findoneof(lower(YourField), '123456789abc...xyz') as SortIndex