Need to Show Actual Start and End Dates, not "This Week/Last Week/Last 2 Weeks"
G'day everyone π I'm trying to use Smart Text (dynamic text) to show the dates being filtered, however the text comes through just as the filter looks (eg. This Week, Last Week, Last 2 Weeks, etc). Ideally, we'd like to show the actual dates being reported (eg. 08/12/2024 - 08/18/2024). I am a bit stuck trying to make this happen - any ideas/help would be greatly appreciated!
The images below show how it currently looks/behaves. What we'd like is for that text in the orange box to be the actual dates of the last week*, so the text there would read 08/12/2024 - 08/18/2024.
*We have a fiscal calendar where the week is Monday-Sunday, and this is in App Studio.
Truly appreciate any help or guidance. Thank you!
Best Answers
-
I don't do much with Smart Text but I think you'd need to create calculated fields to dynamically calculate the start and end dates with a label for the period you need.
Start Date of Last Week:
DATE_SUB(CURRENT_DATE(), INTERVAL (WEEKDAY(CURRENT_DATE()) + 6) DAY)
This calculates the Monday of the previous week.
End Date of Last Week:DATE_SUB(CURRENT_DATE(), INTERVAL WEEKDAY(CURRENT_DATE()) DAY)
This calculates the Sunday of the previous week.
Make sure the calculated fields are include on your dataset. Then use the calculated fields in the smart text something likeLast Week: {Start_Date_Field} - {End_Date_Field}
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **1 -
you could also a summary number in your smart text to select the min and max date values
Alternatively you can do this in a beast mode and add the beast mode as smart text
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1
Answers
-
I don't do much with Smart Text but I think you'd need to create calculated fields to dynamically calculate the start and end dates with a label for the period you need.
Start Date of Last Week:
DATE_SUB(CURRENT_DATE(), INTERVAL (WEEKDAY(CURRENT_DATE()) + 6) DAY)
This calculates the Monday of the previous week.
End Date of Last Week:DATE_SUB(CURRENT_DATE(), INTERVAL WEEKDAY(CURRENT_DATE()) DAY)
This calculates the Sunday of the previous week.
Make sure the calculated fields are include on your dataset. Then use the calculated fields in the smart text something likeLast Week: {Start_Date_Field} - {End_Date_Field}
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **1 -
you could also a summary number in your smart text to select the min and max date values
Alternatively you can do this in a beast mode and add the beast mode as smart text
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
Thank you @ArborRose and @GrantSmith. Truly appreciate the input. Going to test those solutions, fingers crossed! Thanks again!
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