-
Number of week calculations for fiscal YYWW (Year, Week of year)
In our DOMO instance, there are many datasets where we express the date as the Year and Week of year based on our fiscal calendar represented as a string. See attached graphic: For example, with today being October 25, 2022, our fiscal calendar says we are operating in week 2244 of this year. Year = 2022, week of year is…
-
Period to date sales beast mode
Currently using this beast mode for "this year period to date sales": SUM(CASE WHEN `SALE_DATE` > CURDATE()-40 AND (CASE WHEN CURDATE()-1 >= '12/30/2018' AND CURDATE()-1 <= '1/26/2019' THEN 1 WHEN CURDATE()-1 >= '1/27/2019' AND CURDATE()-1 <= '2/23/2019' THEN 2 WHEN CURDATE()-1 >= '2/24/2019' AND CURDATE()-1 <= '3/30/2019'…
-
Comparing days of data 364 days apart
I can't believe this isn't as simple as I think it should be. The dataset has transactions which have a corresponding date value. I need to create a column to compare values for dates 364 days apart. Seems like it should be so simple. This beast mode gets me the current day units: IFNULL(`GG_ELIG_UNITS`,0) (the column set…