This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Date: select first date | |
StartOfDateWeek: fromTimestamp(timestamp(prop("Date")) - (((day(prop("Date")) == 0) ? 7 : ((day(prop("Date")) - 1) * 24 + toNumber(formatDate(prop("Date"), "H")))) * 60 + toNumber(formatDate(prop("Date"), "m"))) * 60 * 1000) | |
WeeksFromOriginal: ceil(dateBetween(now(), prop("Date"), "days") / 7) | |
NearestDate: dateAdd(prop("Date"), prop("WeeksFromOriginal"), "weeks") | |
Whenever it's 24 hours from last event, NearestDate should update to same + 7 days. |