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.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 296 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 614 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 729 Beast Mode
- 53 App Studio
- 40 Variables
- 677 Automate
- 173 Apps
- 451 APIs & Domo Developer
- 45 Workflows
- 8 DomoAI
- 34 Predict
- 14 Jupyter Workspaces
- 20 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 121 Manage
- 118 Governance & Security
- Domo Community Gallery
- 32 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive