7 Replies Latest reply: Mar 23, 2017 7:07 AM by Sunny Talwar RSS

    Set analysis within set analysis | Qlik Sense

    Amir Jaber

      I need to sum anything with a Jrnl_number which is largest than the maximum Jrnl_number for a particular LineRef (here: 'Balance Brought Forward')

       

      LineRefJrnl_numberValue
      A11100
      B12200
      C13300
      'Balance Brought Forward'14350
      'Balance Brought Forward'15400
      E16450
      F17600

       

      In this example the output should be 450 + 600 = 1,050.

       

      I have tried the below but it doesn't seem to work. My mental logic was that a set analysis within a set analysis might work (but I suspect that's not the case).

       

      sum(

        {$<

              Jrnl_number = {">$(=max({$<LineRef = {'Balance Brought Forward'}>}(Jrnl_number)))"} >}

            (Value)

        )