Explore recipe: Creating weekly date buckets

Have more questions? Submit a request


  • 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)

  • Nicole Haberman
    Comment actions Permalink

    I keep getting an error that is difficult to track down "An error has occurred while evaluating Week Bucket for the following values: Ticket solved - Date -> .

    I have the following as my calculated query: 

    DATE_FORMAT(START_OF_WEEK_MONDAY([Ticket solved - Date]), "YYYY-MM-dd")
    + " " + "to" + " " + DATE_FORMAT(END_OF_WEEK_MONDAY([Ticket solved - Date]),


    Is there something wrong with the syntax of the query I have, or is the error related to something else? 

  • Rob Stack
    Comment actions Permalink

    Hi Nicole, I tried this query and got the same error as you did. I'm going to create a ticket for this so we can investigate it properly and get this working for you. Someone will be in touch soon.

  • 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:


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

  • Allen Lai
    Comment actions Permalink

    Feels like something that should come out of the box, rather than having to create a custom calculated attribute.

  • 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! 


Please sign in to leave a comment.

Powered by Zendesk