1 Reply Latest reply: Oct 6, 2017 11:22 AM by Stefan Wühl RSS

    Setanalysis in setanalysis

    Michael Ionkin



      i have the following Problem:


      This works:

      Sum({<[sText iPState]={"Running"}>} Duration)


      This doesn't:

      Sum({<[sText iPState]={"=FirstSortedValue({<Maschinen_Nr_MACSTA={A18}>} [sText iPState], -tBegin)"}>} Duration)


      This alone Returns "Runing":

      =FirstSortedValue({<Maschinen_Nr_MACSTA={A18}>} [sText iPState], -tBegin)


      I think sth is wrong with my Syntax..


      Cheers Michael

        • Re: Setanalysis in setanalysis
          Stefan Wühl

          The expression search should return a boolean value per your field dimension (per value of [sText iPState])

          If you expect a 'Running' that won't be evaluated to TRUE, so no value of [sText iPState] will be part of  the selection for the aggregation.


          Not sure what you want to achieve maybe


          Sum({<[sText iPState]={'$(=FirstSortedValue({<Maschinen_Nr_MACSTA={A18}>} [sText iPState], -tBegin))'}>} Duration)