Getting x axis sorted correctly

Hi,

Any idea on how to fix this so that its in the correct order? The last two columns just need to switch. Its sorted by year and week right now.

Best Answer

  • GrantSmith
    GrantSmith Coach
    Answer ✓

    I'd recommend calcluating the first date of the week and use that for your sorting. If you have a Date field you can do something like this:

    `Date` - INTERVAL (DAYOFWEEK(`Date`)-1) DAY
    

    This will return the Sunday of the week.

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**

Answers

  • GrantSmith
    GrantSmith Coach
    Answer ✓

    I'd recommend calcluating the first date of the week and use that for your sorting. If you have a Date field you can do something like this:

    `Date` - INTERVAL (DAYOFWEEK(`Date`)-1) DAY
    

    This will return the Sunday of the week.

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • Thank you, woulda never thought of that!