How do I change my week to Mon - Sun and fix this report?

I have an auto weekly report that shows the dates of a week and the corresponding data. The report goes out on Monday and I need it to show the previous two weeks (Mon - Sun), not including the current Monday data.
Right now I have manually typed the dates (if 1.2.23, 1.3.23..then week = 1/2 - 1/8) and select the next week each friday before I log off.
How do I make this automatically update to the correct week and data?
Example: Report goes out Mon 1/16/22
1/2 - 1/8: DATA
1/9 - 1/15: DATA
Best Answer
-
Since you are sending this every Monday, you can use this beast mode and put it in your filters and then filter to Include.
CASE when `date` >= DATE_SUB(CURRENT_DATE(), INTERVAL 14 day) and `date` < CURRENT_DATE() THEN 'Include' ELSE 'Exclude' END
You would need to change
date
in my example to the actual date field in your dataset. When filtered to Include, this will only show rows where the date is in the last 14 days and before today.**Check out my Domo Tips & Tricks Videos
**Make sure toany users posts that helped you.
**Please mark as accepted the ones who solved your issue.1
Answers
-
@kathint303 Where are you manually typing the dates now? Is it in the date range or somewhere else in the analyzer?
0 -
Since you are sending this every Monday, you can use this beast mode and put it in your filters and then filter to Include.
CASE when `date` >= DATE_SUB(CURRENT_DATE(), INTERVAL 14 day) and `date` < CURRENT_DATE() THEN 'Include' ELSE 'Exclude' END
You would need to change
date
in my example to the actual date field in your dataset. When filtered to Include, this will only show rows where the date is in the last 14 days and before today.**Check out my Domo Tips & Tricks Videos
**Make sure toany users posts that helped you.
**Please mark as accepted the ones who solved your issue.1
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 656 Datasets
- 115 SQL DataFlows
- 2.2K Magic ETL
- 811 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 80 App Studio
- 45 Variables
- 771 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 77 Workflows
- 23 Code Engine
- 36 AI and Machine Learning
- 19 AI Chat
- AI Playground
- AI Projects and Models
- 17 Jupyter Workspaces
- 410 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 10 Software Integrations
- 142 Manage
- 138 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive