beastmode week start

I have a client whose week starts on Monday.  since the default week start day in Domo is Sunday, I would like to use beastmode to calculate week numbers with a start day of monday.

 

I get a validation error every time I try to input a number in the [mode] portion of WEEK(date,[mode]).  I'm referencing MySQL 5.5 documentation when inputting the number 5 as my mode.  I've tried single quotes, double quotes, no quotes, all get the same error.  I've also tried inputting all numbers from 0-7 in the formula and gotten the same error each time.  Has anyone else encountered/overcome this?

 

from MySQL 5.5 Reference on week function

mysqlWEEK.PNG

 

Error in beastmode calc

beastmodeWEEKerror.PNG

 

 

Best Answer

Answers

  • kshah008
    kshah008 Contributor

    Hi all,


    Can anybody help @kingaaronj out?

    Thanks!

  • Thank you for this @ilikenno.  Very helpful!

     

    I actually noticed through trial & error that WEEK(`Date Column`) appears to give the same result as WEEK(`Date Column`,22) where the weeks start on Monday.  Good to know.

  • can you start the week on a Friday 

    Week(date,?) what number do you use 

    thanks 

  • Hello,

    I know this is an old thread, but perhaps someone is still reading. I would like my year to begin on 6/1 and week to begin on Saturday, and end Friday. I'm messing around in Beast Mode trying to get this to work. Here is what I have so far:

     

    WEEK(`INVOICE_DATE`,61)

  • rado98
    rado98 Contributor

    Two ways of doing it (for me anyways):

     

    IF you need this as the calendar for your whole instance, ask your Domo rep to set it up as a Fiscal Calendar

     

    If this is for a specific card:

    Create a spreadsheet with the following columns adjsuted for your new calendar

    Date, Adjusted Year, Adjusted Week First Day

    Join them using ETL

     

    You cna then use those columns when building cards, not as good as a fiscal calendar though.

     

  • thank you, it works

    WEEK(timestamp,1) move the beginning of the week from Sunday to Monday