1 Reply Latest reply on Oct 28, 2018 11:50 AM by Yuriy Fal

    Create a selection by month box based on fixed month's

    Herbert Morelissen

      Hello,

       

      I'm trying to create a selection method based on a list of fixed month (januari - December) and not on datetrunc('month',[order date]) or in my case datetrunc('month', [Raised])

      The reason why is that i'm doing availablility calculations. 

      at the moment

       

      I select the current month

      date(datetrunc('month',[Raised]))

       

      Add on month to the current month

      date(dateadd('month',1,datetrunc('month',[Raised])))

       

      and then calculate the number of seconds in this month

      total number of seconds per month

      sum((datediff('day',[Truncmonth],[Truncmonth +1])) * 24 *60 * 60))

       

      based on that I calculate the total outage for one device.

      (1 - (sum([duration event_int]) / sum([total number of seconds per month] )))* 100

       

      example:

      device  -  outage time in seconds - availability in % - number of seconds – number of events

      device 1  -   6566 -  99,746%   -  2592000 - 1

       

      This works fine when there is just one event / disruption or one month selected.

       

       

      When multiple events the total number of seconds in that month is doubled because there are 2 lines

      Device  -  outage time in seconds - availability in % - number of seconds – number of events

      device 1  -   6566 -  99,8733%   -  5184000 -   2

       

       

      and when you select multiple month’s 2 ( September and October)  with only one event .

       

      you still get:

      device  -  outage time in seconds - availability in % - number of seconds – number of events

      device 1  -   6566 -  99,746%   -  2592000 - 1

       

      Then I expected:

      Device  -  outage time in seconds - availability in % - number of seconds – number of events

      device 1  -   6566 -  99,8733%   -  5184000 -   1

       

      any one any idea how to solve this?

       

      best regards,

       

      Herbert