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.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive