I have a weekly report that shows the last 6 months' orders totals in a line chart, by week. These weeks span Monday-Sunday, and the formula I used to create the Monday-start weeks was:
DatePart ("ww", {Orders_Info_BE.OrderCreateDate}, 2)//where the "2" makes Monday the starting date
After grouping on this formula, I changed the group display name by using another formula to make the date display appropriately in the line chart ( instead of showing 1,2,3,4 as the week number, I wanted to see the starting date of the data week):
totext({Orders_Info_BE.OrderCreateDate}-Dayofweek({Orders_Info_BE.OrderCreateDate},2)+1,"MM/dd/yyyy")
Now it's the second week in January 2013, and my line chart is displaying the first and second week of this year at the very beginning of the chart, followed by the other previous months from last year. I'm sure this has something to do with the display formula above that sets the date display to text.
How can I rewrite the group name display formula so that the chart will display the weeks in chronological order, correctly?
Thank you,
Adria
DatePart ("ww", {Orders_Info_BE.OrderCreateDate}, 2)//where the "2" makes Monday the starting date
After grouping on this formula, I changed the group display name by using another formula to make the date display appropriately in the line chart ( instead of showing 1,2,3,4 as the week number, I wanted to see the starting date of the data week):
totext({Orders_Info_BE.OrderCreateDate}-Dayofweek({Orders_Info_BE.OrderCreateDate},2)+1,"MM/dd/yyyy")
Now it's the second week in January 2013, and my line chart is displaying the first and second week of this year at the very beginning of the chart, followed by the other previous months from last year. I'm sure this has something to do with the display formula above that sets the date display to text.
How can I rewrite the group name display formula so that the chart will display the weeks in chronological order, correctly?
Thank you,
Adria