This week we dive into date calculations in SAQL! Unlike other languages, SAWL doesn’t have a simple DATEADD() function. Instead we need to build one ourselves in order to be able to add days to a given date.
In this example we have case records with an Open Date, a Close Date and an SLA in days. Your challenge is to determine which of the cases were closed within the SLA!
- Recreate the dashboard as below
- All calculations should be done in SAQL, NO RECIPIES!
- Bar length is the number of hours a case spent “open”
- Bar colour is based on whether the case was closed within the SLA
- The SLA is defined in days in the “SLA” column
- The SLA starts counting at midnight of the following day (ie. If I open a case at 4pm, the SLA clock doesn’t start ticking for another 8 hours.)
- Make sure the numbers and the SLA status matches exactly!
- Match all formatting (Axis, labels, headlines, etc.)
- Match the tooltips
The resulting dashboard should look something like this:
This week we are dealing with a tiny data set of 6 records and 5 columns. You can download it here on data.world.
After you finish your workout, share a screenshot of your solutions or interesting insights.
Also make sure to fill out the Submission Tracker to track your progress and help us judge the difficulty of our challenges.