Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have data that goes from 0 to 10. I want to create a filter pane that would start at 3 and go to 2. Example:
0 1 2 3 4 5 6 7 8 9 -> 3 4 5 6 7 8 9 0 1 2
how would i do this?
Thanks
You may apply a conditional function for the sorting like:
pick(match(Field, 3 4 5 6 7 8 9 0 1 2), 0 1 2 3 4 5 6 7 8 9) // with commas instead spaces as value-delimiter
Another method would be to pre-load your values, like:
temp: load * inline [
Field
3
4
...];
then loading your origin data and after it removing the temp-table again. Now you could use the load-order for the sorting.
- Marcus
it has set the sorting to 0 1 2 3 4 5 6 7 8 9 instead of 3 4 5 6 7 8 9 0 1 2. How can this be fixed?
The load-approach like suggested should work but the expression has a logical error because the pick() isn't set right respectively wouldn't be needed for this scenario. Therefore change it to:
match(Field, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2)
- Marcus
so my actual sorting is from 0 to 24. And after applying your recent coment i get a weird sorting order:
Regards
If the range of numbers is different you will need to adapt the sorting-measures appropriate. Further you need to ensure that this sorting is also applied as the first sorting-option.
- Marcus
i have set this column as the first sorting option. It works better now but for some reason 10 is on top, everything else is set to the right sorting order
Regards
This looked like a normal numerical sorting and not like a customized one. Are you sure that you have set the sorting to the expression (and before also checked that the expression is logically and syntactically working because an invalid expression will be ignored)? If you have chosen to apply the sorting per load-order then this option needs to enabled.
- Marcus