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.4K Product Ideas
- 1.4K Ideas Exchange
- 1.4K Connect
- 1.1K Connectors
- 278 Workbench
- 4 Cloud Amplifier
- 4 Federated
- 2.7K Transform
- 89 SQL DataFlows
- 557 Datasets
- 2K Magic ETL
- 3.3K Visualize
- 2.3K Charting
- 571 Beast Mode
- 11 App Studio
- 28 Variables
- 579 Automate
- 141 Apps
- 414 APIs & Domo Developer
- 23 Workflows
- 1 DomoAI
- 28 Predict
- 12 Jupyter Workspaces
- 16 R & Python Tiles
- 352 Distribute
- 92 Domo Everywhere
- 258 Scheduled Reports
- 2 Software Integrations
- 92 Manage
- 89 Governance & Security
- 9 Product Release Questions
- Community Forums
- 42 Getting Started
- 28 Community Member Introductions
- 88 Community Announcements
- 4.8K Archive