2 Replies Latest reply: Feb 4, 2016 12:34 PM by Gysbert Wassenaar RSS

    Set analysis - ignores filters on list box

    Björn Ununger

      I have an expression in a text object, like below:

       

      =num

      (sum({$<PeriodCounter={">$(#=max(PeriodCounter-3))<=$(#=max(PeriodCounter)-2)"}, YearMonthNum=,Year=>}SickTime*+1)

      /

      sum({$<PeriodCounter={">$(#=max(PeriodCounter-3))<=$(#=max(PeriodCounter)-2)"}, YearMonthNum=,Year=>}WorkTime)+1

      , '# ##0,0%')

       

      And when I do a selection in a list box for YearMonthNum I don't wont the expression to affect to expression.

      I have try to include the field "YearMonthNum=" in the expression and also change $ to 1 but it does't work.

      If I exlude the filter with PeriodCounter it works.


      Any suggestions?   

        • Re: Set analysis - ignores filters on list box
          Sunny Talwar

          May be you needed it within the inner Max() function as well. Try this:

           

          =Num

          (Sum({$<PeriodCounter={">$(#=max({<YearMonthNum, Year>}PeriodCounter-3))<=$(#=max({<YearMonthNum, Year>}PeriodCounter)-2)"},YearMonthNum=,Year=>}SickTime*+1)

          /

          sum({$<PeriodCounter={">$(#=max({<YearMonthNum, Year>}PeriodCounter-3))<=$(#=max({<YearMonthNum, Year>}PeriodCounter)-2)"}, YearMonthNum=,Year=>}WorkTime)+1

          , '# ##0,0%')

          • Re: Set analysis - ignores filters on list box
            Gysbert Wassenaar

            Try addding it to the max functions too:

             

            =num

            (sum({$< PeriodCounter={">$(#=max({<YearMonthNum=,Year=>}PeriodCounter-3))<=$(#=max({< YearMonthNum>}PeriodCounter)-2)"},YearMonthNum=,Year=>}SickTime*+1)

            /

            sum({$<PeriodCounter={">$(#=max({<YearMonthNum,Year=>}PeriodCounter-3))<=$(#=max({<YearMonthNum,Year=>}PeriodCounter)-2)"}, YearMonthNum=,Year=>}WorkTime)+1

            , '# ##0,0%')