Adding filtered count to dynamic text box

I have a dynamic text box that says, in effect, "As of 4/7/2023, there are 75 unhandled service requests." I do this by having as the category a beast mode called "Today", which is simply CURRENT_DATE(), and as value I have "Age", a numeric field showing how long ago, in days, the request was created. I would like to add a second phrase, "of which 45 are older than 5 days". It seems like I would have to somehow filter "Age" inline as one of the %_ values. Is there a way to accomplish this result? Thank you.
Best Answers
-
Have you tried using a beast mode to calculate the difference between now and 5 days ago and counting them?
COUNT(CASE WHEN `date_field` < CURRENT_DATE() - INTERVAL 5 DAY THEN `date_field` END)
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
If your data is in 2 rows then you can use the dynamic textbox and use the last and penultimate data to display it like this.
If your data is all in 1 row then I would suggest using the Multi-Value card under Gauges and you can use the Gauge Value and Target Value. This gauge has quite a few properties and can be configured in a lot of different ways to display the information you want.
A third option is to use the Textbox card and build all of your dispaly in a beast mode using CONCAT() to combine your text with your data.
**Check out my Domo Tips & Tricks Videos
**Make sure toany users posts that helped you.
**Please mark as accepted the ones who solved your issue.1
Answers
-
Have you tried using a beast mode to calculate the difference between now and 5 days ago and counting them?
COUNT(CASE WHEN `date_field` < CURRENT_DATE() - INTERVAL 5 DAY THEN `date_field` END)
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
If your data is in 2 rows then you can use the dynamic textbox and use the last and penultimate data to display it like this.
If your data is all in 1 row then I would suggest using the Multi-Value card under Gauges and you can use the Gauge Value and Target Value. This gauge has quite a few properties and can be configured in a lot of different ways to display the information you want.
A third option is to use the Textbox card and build all of your dispaly in a beast mode using CONCAT() to combine your text with your data.
**Check out my Domo Tips & Tricks Videos
**Make sure toany users posts that helped you.
**Please mark as accepted the ones who solved your issue.1 -
Thank you both @GrantSmith and @MarkSnodgrass. No, the idea of making a beast mode to produce the entire body of text never occurred to me. I can only plead newbness. For anyone else trying to solve a similar problem, here's what I came up with:
CONCAT( 'On ',
CURRENT_DATE(),
' there are ',
COUNT(CASE WHEN active = 'true' THEN active END),
' open REQs, ranging from ',
ROUND(MIN(CASE WHEN active = 'true' THEN Age (Days) END), 1),
' to ',
ROUND(MAX(CASE WHEN active = 'true' THEN Age (Days) END), 1),
' days old. Of those, ',
COUNT(CASE WHEN (Opened At < CURRENT_DATE() - INTERVAL 5 DAY) AND active = 'true' THEN Opened At END),
' are > 5 days old.'
)That seems to work as I hoped, give or take some tick marks that got smacked by the forum formatter.
1
Categories
- 10.6K All Categories
- 8 Connect
- 918 Connectors
- 250 Workbench
- 477 Transform
- 1.8K Magic ETL
- 69 SQL DataFlows
- 478 Datasets
- 218 Visualize
- 260 Beast Mode
- 2.1K Charting
- 12 Variables
- 19 Automate
- 356 APIs & Domo Developer
- 89 Apps
- 3 Workflows
- 20 Predict
- 5 Jupyter Workspaces
- 15 R & Python Tiles
- 249 Distribute
- 65 Domo Everywhere
- 243 Scheduled Reports
- 21 Manage
- 42 Governance & Security
- 191 Product Ideas
- 1.2K Ideas Exchange
- 11 Community Forums
- 27 Getting Started
- 14 Community Member Introductions
- 55 Community News
- 4.5K Archive