Group SLA case age into 24hr intervals
Hi, working in Support, the time to resolution is a key metrics for us. We measure how many cases we close within 24 hrs, 48, 72 etc.
In Exel, there is a quick and easy way to group the Age into e.g. 24hrs buckets. Is there something similar in Domo?
I started creating a Beast Mode, but this would get very long.
(CASE
WHEN `Age (Hours)`< 72 THEN '0-72'
WHEN `Age (Hours)`>=72 AND `Age (Hours)`< 96 THEN '72-96'
WHEN `Age (Hours)`>= 96 AND `Age (Hours)`< 120 THEN '96-120'
WHEN `Age (Hours)`>= 120 AND `Age (Hours)`< 144 THEN '120-144'
WHEN `Age (Hours)`>= 144 THEN '> 144'
ELSE 'blank' END)
This is a rough grouping in Excel:
Thanks much for ideas!
Comments
-
One tip you can do is perform your case statement in descending order. This is because a case statement will execute the first case it comes across that's true so it's implied when doing it in decending order that it's already less than the prior value.
CASE WHEN `Age (Hours)`>= 144 THEN '> 144' WHEN `Age (Hours)`>= 120 THEN '120-144' WHEN `Age (Hours)`>= 96 THEN '96-120' ... END
That may simplify your beast mode a bit but you have several buckets you're needing. I'd propose a different tact since all your buckets are 24 hours:
CASE WHEN `Age (Hours)` >= 240 THEN '240+' ELSE CONCAT(FLOOR(`Age (Hours)`/24) * 24, '-', FLOOR((`Age (Hours)`+24)/24) * 24 - 1) END
Simply we're saying if it's more than 240 hours then just put it in the 240+ bucket. You can change this as needed.
The ELSE statement is adding the start and end point of your buckets.
FLOOR(`Age (Hours)`/24)
This is returning the number of whole days. Then we multiple it back by 24 to get the start of your 24 hour bucket.
So example 26 hours: FLOOR(26/24) = 1 * 24 = 24.
We then do something similar with the upper bound of your bucket except we add an additional 24 hours to bump it into the next day, divide by 24 and use FLOOR to get the whole number of days. We then multiply it back by 24 to convert it to house then subtract 1 to get one less hour than the start of the next day.
Simply put we're rounding to the nearest day in units of hours.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
@GrantSmith Thanks for the detailed explanation. Helps a lot!
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive