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
- All Categories
- 1.2K Product Ideas
- 1.2K Ideas Exchange
- 1.3K Connect
- 1K Connectors
- 267 Workbench
- Cloud Amplifier
- 3 Federated
- 2.5K Transform
- 78 SQL DataFlows
- 524 Datasets
- 1.9K Magic ETL
- 2.9K Visualize
- 2.2K Charting
- 433 Beast Mode
- 22 Variables
- 507 Automate
- 113 Apps
- 386 APIs & Domo Developer
- 8 Workflows
- 25 Predict
- 9 Jupyter Workspaces
- 16 R & Python Tiles
- 331 Distribute
- 76 Domo Everywhere
- 255 Scheduled Reports
- 65 Manage
- 65 Governance & Security
- 1 Product Release Questions
- Community Forums
- 39 Getting Started
- 25 Community Member Introductions
- 67 Community Announcements
- 4.8K Archive