Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi friends,
I have a quarter field with the values
110,209,210,309,409 its a number filed
so when i used this field in chart its not in order.
i wanted to display this as
209,309,409,110,210
how can i do this any help???
Regards,
mahesh.g
There's a number of ways to do this (for example, using Dual()), but the quick-and-dirty solution would be to sort by an expression, and use:
left(quarter,2) & right(quarter,1)
(In other words - for the purpose of sorting, reverse the order of year and quarter).
Hope this helps.
If the data is read chronologically you could just use "Load Order" as sort.
i have written expression in sorting like mid(qtr,2,1).
and sorted by numeric value . its giving the correct sorting values but i think this is not that way to get .
i need to get proper solution for this .
is there any one to give???
hi,
any help how can i sort my quarter???
I sometimes sort my data while loading and use load order, as Johan said. I'm not sure if it goes all the way to a "proper solution", but it works well enough.
I think dual() as mentioned by Or Shoham would be a "proper solution". Each quarter then has a display value and an underlying numeric value, and the underlying numeric value can be used to sort the quarters correctly. For instance, something like this:
dual(ceil(month(Date)/3)&yearstart(Date,'YY'),quarterstart(Date)) as Quarter
There's also this approach, which I think is much more understandable than using something like 310 as your quarter:
quartername(Date) as Quarter
hi all,
i am keep on trying with all the things but no luck .
i have created ag roup with quarter and year. i am using this group field in chart thats the big problem to get sorting in chart.
year is sorted but i am not able to sort quarter.
can any have any idea on this???
regards,
mahesh.aga
Hi,
did you try to enter a new field in your script
Num(QuarterName(Datefield)) as NumQuarter
this gives you a number of the Datefiled for every quarterbeginning.