Days since last Wednesday
Best Answer
-
Ended up using this to be the 'last Thursday' part. Not sure if ther is a more elegant way for it but it does the job.
case
when DAYOFWEEK(CURRENT_DATE())=1 then CURRENT_DATE()-3
when DAYOFWEEK(CURRENT_DATE())=2 then CURRENT_DATE()-4
when DAYOFWEEK(CURRENT_DATE())=3 then CURRENT_DATE()-5
when DAYOFWEEK(CURRENT_DATE())=4 then CURRENT_DATE()-6
when DAYOFWEEK(CURRENT_DATE())=5 then CURRENT_DATE()-1
when DAYOFWEEK(CURRENT_DATE())=6 then CURRENT_DATE()-2
when DAYOFWEEK(CURRENT_DATE())=7 then CURRENT_DATE()-3
end0
Answers
-
Ended up using this to be the 'last Thursday' part. Not sure if ther is a more elegant way for it but it does the job.
case
when DAYOFWEEK(CURRENT_DATE())=1 then CURRENT_DATE()-3
when DAYOFWEEK(CURRENT_DATE())=2 then CURRENT_DATE()-4
when DAYOFWEEK(CURRENT_DATE())=3 then CURRENT_DATE()-5
when DAYOFWEEK(CURRENT_DATE())=4 then CURRENT_DATE()-6
when DAYOFWEEK(CURRENT_DATE())=5 then CURRENT_DATE()-1
when DAYOFWEEK(CURRENT_DATE())=6 then CURRENT_DATE()-2
when DAYOFWEEK(CURRENT_DATE())=7 then CURRENT_DATE()-3
end0
Categories
- 10.5K All Categories
- 7 Connect
- 917 Connectors
- 250 Workbench
- 466 Transform
- 1.7K Magic ETL
- 69 SQL DataFlows
- 477 Datasets
- 193 Visualize
- 252 Beast Mode
- 2.1K Charting
- 11 Variables
- 17 Automate
- 354 APIs & Domo Developer
- 89 Apps
- 3 Workflows
- 20 Predict
- 5 Jupyter Workspaces
- 15 R & Python Tiles
- 246 Distribute
- 62 Domo Everywhere
- 243 Scheduled Reports
- 21 Manage
- 42 Governance & Security
- 173 Product Ideas
- 1.2K Ideas Exchange
- 12 Community Forums
- 27 Getting Started
- 14 Community Member Introductions
- 55 Community News
- 4.5K Archive