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.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 731 Beast Mode
- 55 App Studio
- 40 Variables
- 682 Automate
- 175 Apps
- 451 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 122 Manage
- 119 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 107 Community Announcements
- 4.8K Archive