First and last week of the year

When building cards and having it weekly, my cards always shows a dip at the end/beginning of each year. 

 

This is because week 1 and week 53 are typically shorter.

 

Has anybody came up with a method to combine these accurately? 

 

past year by week.png

 

Best Answer

  • Godiepi
    Godiepi 🟣
    Accepted Answer

    Try this beastmode and use it as your x-axis

     

    CASE
    WHEN WEEK(`TransactionDate`, 11) = 1
    THEN STR_TO_DATE(CONCAT('12-31-', YEAR(`TransactionDate`) - 1), '%m-%d-%Y')
    ELSE `TransactionDate`
    END

Answers

  • @gatormain, did @Godiepi's reply help you out?

  • Do you know if there are any soultions that will not shift the acutal date of the transaction? Trying to leave the cards with the ability to change the by date dimension without skewing the data.

This discussion has been closed.