Calculating Date Time Stamps for duplicate ID's
I am tasked to create KPIs for how long it takes for an ID to sit in a specific status. Attached is a snippet of sample data for reference.
The amount of days for the first "status change time' would be taken from the 'HRC Create date', or when the ID was created, the rest of the changes would be the difference between each status time change and stop after there is a new ID.
What would a beast mode look like to calculate the amount of days between each time change per ID #?
Thanks in advance.
Comments
-
The TIMEDIFF() function will get you the hh:mm:ss value between the two if you are just looking to get the difference between the Status Change Time and the NRC Create Date in a single row.
Yours would look like this:
TIMEDIFF(`Status Change Time`,`HRC Create Date`)
Here's a link to the documentation:
**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.0 -
Yes i know that is the calculation to find the difference in time, but I am looking to base those calculations off of the specific ID numbers.
Since there are multiple changes to a specific ID the calculation will be different than just the Timediff function. For the first time change of the ID, the time difference should look exactly how you typed it out,
TIMEDIFF(`Status Change Time`,`HRC Create Date`)
but the other changes should not reference the "HRC Create Date". It should be a difference between the top row's "Status Change Time" and the new row's "Status Change TIme".
This calculation should also start over every time the ID number changes.
Hope this additional information helps, it's a little more complicated than I would have liked!
0 -
To get the time between the first entry of one column and the last entry of another for a particular column, you are going to need to use the ETL. You can accomplish by doing a Group By and group by the ID and use the MIN function on the HRC Create Date and the MAX function on the Status Change Time. This would give you one row for each ID with the earliest HRC Create Date for that ID and latest Status Change Time for that ID.
You could build a card off of that dataset and then add a drill path to drill into the detailed dataset if you needed to show the individual changes.
Hope this helps.
**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 -
Kind of what I was looking for but not quite. I ended up bringing the data into redshift and wrote sql code to get what I was looking for. Thanks for your help!
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 297 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 729 Beast Mode
- 54 App Studio
- 40 Variables
- 678 Automate
- 173 Apps
- 451 APIs & Domo Developer
- 46 Workflows
- 8 DomoAI
- 34 Predict
- 14 Jupyter Workspaces
- 20 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 121 Manage
- 118 Governance & Security
- Domo Community Gallery
- 32 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive