3 Replies Latest reply: Jun 9, 2018 4:56 AM by Christian Hengesbach RSS

    Two not connected time periods in one set analysis command

    Christian Hengesbach

      Dear community,


      I would like to compute one single standard deviation for the data of two time periods which are not directly connected. I'm using variables to define the minimum and maximum dates of the two ranges.


      To make up an example let's assume that

      vMinDtControlPeriod1 = 1.1.2017

      vMaxDtControlPeriod1 = 10.1.2017

      vMinDtControlPeriod2 = 20.1.2017

      vMaxDtControlPeriod2 = 25.1.2017


      To compute the standard deviation of one single date range the simple set analysis command would look like this:


      Stdev(Aggr(count({$< bkg_dt={">=$(vMinDtControlPeriod1)<=$(vMaxDtControlPeriod1)"}>} counter), bkg_dt))


      But I cannot find a way to include the second time range as well. I tried something like


      Stdev(Aggr(count({$< bkg_dt={">=$(vMinDtControlPeriod1)<=$(vMaxDtControlPeriod1)"},

                                          bkg_dt={">=$(vMinDtControlPeriod2)<=$(vMaxDtControlPeriod2)"}>} counter), bkg_dt))

      but this is not working. Is there any way to filter the data on two not directly connected periods using an "or" command or anything else?

      Thanks in advance,