9 Replies Latest reply: Mar 14, 2017 5:36 AM by Adam Davies RSS

    Plotting the distribution of timestamps

    Michael Squirrell

      Dear all,

      I am developing some histograms that show a time series distribution, using the difference between two timestamps.


      I am using a calculated dimension, as follows:

      =Round(Aggr(Interval(Only({$<OP_NAME={'Assess'}>}CLOSED_DATE_TIME) - Only({$<OP_NAME={'Validate'}>}CLOSED_DATE_TIME),'mm'),INSTANCEID),BinWidth)


      So, the output of this expression is the time in minutes between 2 timestamps that are identified based on a related description field in the database table. BinWidth is a variable that can be set on the screen. (Thankyou Henric Cronstrom for an easy to follow description of how to do this).

      In the expression field, I am running a simple count of each record that falls into each column of the histogram, based on the binwidth.

      The result looks like this; which is a great first step.



      What I want to achieve now is to have the X axis being the interval time in minutes, not a binwidth. This would range from 0 where the difference in timestamps is very close, to typically around 180 minutes.

      How can I modify the calculated dimension above so that the x axis plots the histogram column based on the interval calculated, rather than using binwidth?

      Thanks in advance for any advice you can provide.