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 to any 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 to any 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.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
- 737 Beast Mode
- 55 App Studio
- 40 Variables
- 684 Automate
- 176 Apps
- 452 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
- 123 Manage
- 120 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive