Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a Segment field with values 'H', 'M', 'L'
To sort these, I am not able to use load order, alphabetical, etc. Without adding an INLINE table to the script, is it possible to use tha Rank function to order my segments like H, M, L in my table?
Many thanks
Mel
You can use an expression to sort the chart. On the Sort tab choose the option Sort By Expression and use this expression: =match(only({1}Segment), 'H','M','L')
Use as below..
Load
Dual(Field,Ord(Field)) as Field
Inline
[
Field
H
M
N
X
Z
];
Now you can sort by ascending or descending order.
Hi Manish,
Thank you very much for this. I'm not able to touch the load script, however. Is it possible to accomplish similar from a calculated dimension or from Sort at a chart level?
Thanks
Mel
Hi mvankluyve,
you won't be able to use rank like this, you could potentially load your field as a dual() so that each value does have an underlying numerical value for you to sort using.
The other option you have is to sort via an expression and define the order within this.
Hope that helps
Joe
You can use an expression to sort the chart. On the Sort tab choose the option Sort By Expression and use this expression: =match(only({1}Segment), 'H','M','L')
Brilliant - thanks so much, Gysbert!