Default to Current Week
How can I set up a card to default to the current week?
Basically I have data with the Week Number in . I want to the card to automatically open in the current week we are in.
For example. This week (week commencing 14th October (from sunday)) is week 42 so I want my card to open from week 42
Any help would be appreciated.
Best Answer
-
In this situation you would have to write a beastmode and filter on it.
CASE WHEN `Actual Year` = YEAR(CURRENT_DATE) AND `Act Week` = WEEK(CURRENT_DATE,0) THEN 'True' ELSE 'False' END
Then you would bring this into your filter and select 'True'
Thanks,
Brian
**Please mark "Accept as Solution" if this post solves your problem
**Say "Thanks" by clicking the "heart" in the post that helped you.0
Answers
-
Hi SiGill1979,
You should be able to accomplish this by choosing the "This Week" option in the "Date Range" section of your card. Please see the attachment.
Hope this helps,
Brian
**Please mark "Accept as Solution" if this post solves your problem
**Say "Thanks" by clicking the "heart" in the post that helped you.0 -
hanks for this. although my data doesn't have a date in it, just year and week number.
Please see attachment
0 -
In this situation you would have to write a beastmode and filter on it.
CASE WHEN `Actual Year` = YEAR(CURRENT_DATE) AND `Act Week` = WEEK(CURRENT_DATE,0) THEN 'True' ELSE 'False' END
Then you would bring this into your filter and select 'True'
Thanks,
Brian
**Please mark "Accept as Solution" if this post solves your problem
**Say "Thanks" by clicking the "heart" in the post that helped you.0 -
Thats looks perfect
Thank you for your help
0 -
Great thanks, and if you wanted to use the "Date Range" function to be more dynamic and allow users to change the week while viewing the card, you could write a beastmode like this ...
STR_TO_DATE(CONCAT(`Actual Year`,' ',`Act Week`,' Sunday'),'%X %V %W')
This will create a date based on the year and week, assuming your start of week is Sunday. Then you can use this newly created beastmode in the "Date Range" and choose "This Week"
Glad I could help,
Brian
**Please mark "Accept as Solution" if this post solves your problem
**Say "Thanks" by clicking the "heart" in the post that helped you.0
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 293 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 96 SQL DataFlows
- 607 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.4K Charting
- 705 Beast Mode
- 49 App Studio
- 39 Variables
- 667 Automate
- 170 Apps
- 446 APIs & Domo Developer
- 44 Workflows
- 7 DomoAI
- 33 Predict
- 13 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 115 Manage
- 112 Governance & Security
- Domo Community Gallery
- 31 Product Releases
- 9 Domo University
- Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 103 Community Announcements
- 4.8K Archive