Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have one field dayscheck as below
dayscheck
0-10 Days
11-30 Days
31-50 Days
51-70 Days
70+ Days
I used the above dayscheck field in my caliculated dimension.
=if(wildmatch(Billing,'pending','approved','Dues','Verified','Closed'),dayscheck)
Now problem is with legend. It is diplaying the order in below way,
I am unable to sort the order Can anyone please help me to sort the order in legend.
Thanks, Durga
Hi durga, I usually create the buckets using dual function, so the values are a number with a text representation, in script you can create dayscheck like this:
If....., Dual('0-10 Days', 1),
If(...., Dual('11-30 Days', 2)... and so on
This way the text is related to a number and they can be sorted easily, usually they are automatically sorted using the number.
Look here
Go to sort tab and under expression write below
=Only({1}Pick(Match(dayscheck,'0-10 Days','11-30 Days','31-50 Days','51-70 Days','70+ Days'),1,2,3,4,5))
You can also use Load Order sorting. Just put this this inline table at the begin of your script and drop it at the end.
SortingTable:
LOAD * INLINE [
dayscheck
0-10 Days
11-30 Days
31-50 Days
51-70 Days
70+ Days];
i have a shorter solution:
goto sort tab and define
=num(left(dayscheck,1)
and sort ascending
Expression will get 0,1,3,5, 7 and that should be all you need
Hi Robert,
Thanks for response! I followed the same as in that link but it is not sorting the legend values. again it is showing the order as in screenshot.
Advice me!
Thanks,
durga
=Only({1}Match(dayscheck,'0-10 Days','11-30 Days','31-50 Days','51-70 Days','70+ Days'))
Hi durga, I usually create the buckets using dual function, so the values are a number with a text representation, in script you can create dayscheck like this:
If....., Dual('0-10 Days', 1),
If(...., Dual('11-30 Days', 2)... and so on
This way the text is related to a number and they can be sorted easily, usually they are automatically sorted using the number.
Hi Rudolf/Manish,
I have calicuated dimension in pie chart as below:
=if(wildmatch(Billing,'pending','approved','Dues','Verified','Closed'),dayscheck)
Now my dimension label name is status, if i go to sort tab it is showing status dimension, i write condition as you said but it is not changing the dimension order.
@ Manish: how can i write set expression for dayscheck in calicualted dimension.
same clumsy order is displaying in legend as above screenshot.
Thanks,
Durga
can you post example qvw?