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 -
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
- 7.7K All Categories
- 12 Connect
- 925 Connectors
- 247 Workbench
- 441 Transform
- 1.7K Magic ETL
- 61 SQL DataFlows
- 456 Datasets
- 88 Visualize
- 222 Beast Mode
- 2.1K Charting
- 8 Variables
- 5 Automate
- 349 APIs & Domo Developer
- 85 Apps
- Workflows
- 17 Predict
- 3 Jupyter Workspaces
- 14 R & Python Tiles
- 242 Distribute
- 60 Domo Everywhere
- 241 Scheduled Reports
- 18 Manage
- 39 Governance & Security
- 46 Product Ideas
- 1.1K Ideas Exchange
- 6 Community Forums
- 19 Getting Started
- 6 Community Member Introductions
- 50 Community News
- 18 Event Recordings
- 577 日本支部