Explore recipe: Creating weekly date buckets

Have more questions? Submit a request

3 Comments

  • Terry O'Donnell
    Comment actions Permalink

    Hi Andrew,  This article was helpful.  I have a need for all Explore Weekly Reporting to start Sunday and end on Saturday.  The current default Week in Explore starts on Monday and ends on Sunday.

    Will I need to build out some weekly metrics to have a Sun-Sat work week?

     

    Insights allowed a couple choices of week start and end dates.

     

    Can the be a feature Request for Explore?

     

    Thanks, ~Terry (Evernote)

    1
  • Andrew Forbes
    Comment actions Permalink

    Hey Terry,

     

    You can build out some custom metrics to track weeks that start on Sunday. The formula looks something like: START_OF_WEEK_SUNDAY(_date). 

     

    We don't currently have it on the roadmap for this to be a native feature, but it is possible with a Calculated Attribute. I'll bring it up with our Product team to see their thoughts! 

    0
  • Travis Tubbs
    Comment actions Permalink

    I think the syntax of the example provided is incorrect because I keep getting an error when copying it and attempting to put in a field name. Specifically, the brackets are in the wrong place.

    The field name should be enclosed in brackets, not the DATE function. For example:

    DATE_FORMAT(START_OF_WEEK_MONDAY(DATE([Date])), "YYYY-MM-dd")

    At least, that's what I had to do to get this to work.

    0

Please sign in to leave a comment.

Powered by Zendesk