2024 Week 05 – Case SLAs


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:


  • If you are totally stuck, google what a UNIX timestamp is and thin about how you could use this to build a logic that mimics a DATEADD() function.


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.

Either on Twitter using the hashtags #WOW2024 and #CRMA and tag @genetis@PreenzJ@LaGMills and @msayantani(Or you can use this handy link to do that)

Or on LinkedIn, tagging Alex Waleczek, Preena Johansen, Lauren Mills, Sayantani Mitra and Phillip Schrijnemaekers using the hashtags #WOW2024

Also make sure to fill out the Submission Tracker to track your progress and help us judge the difficulty of our challenges.


I’ll post a solution later this week
Scroll to Top