Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I have a problem with the sort order in a bar chart. On the x-axis I have a field, let's call it MyYearWeek, which contains the following values:
2013-51
2014-1
2014-12
2014-2
My problem is that I don't know how to sort it correctly, right now with my A->Z sorting the values presents as 2013-51, 2014-1, 2014-12, 2014-2 of course... I really do want to keep the 'YYYY-WW' formatting for my field values. How to sort it within the chart object sort tab, without changing my script below... Perhaps I could use the Year field and Week field seperately for sorting?
My script:
Year(MyDate) As MyYear,
Week(MyDate) As MyWeek,
Year(MyDate) & '-' & Week(MyDate) As MyYearWeek
Thanks in advance.
Regards,
Filip
Hi Filip,
Do you have to keep the format as YYYY-WW or can it be changed to YYYYWW?
if it can be changed, just use
Year(MyDate)*100+Week(MyDate) as MyYearWeek
instead of your original expression and then use numeric sort on the chart. It will work.
Thanks and BR.
Abhinava
Thanks, works great.
Thank you all for your help.
Useful discussion. bookmarked it
It solved my problem of sorting my X-Axis which is like MonthName-Year. Thanks