1 Reply Latest reply: Sep 16, 2016 12:10 PM by Sunny Talwar RSS

    Code

    Coder cire

      Hi All

       

      This is my first post to qlikview.

      Can anybody help me in getting the below result.

       

      Desired Output.png

       

      Here, I need to pick the First OK Status User wise.

       

      Regards

      Cire

        • Re: Code
          Sunny Talwar

          Try this:

           

          Table:

          LOAD User,

              Date(MonthStart(Date#(Month_Filter, 'MMM YYYY')), 'MMM YYYY') as Month_Filter,

              New_Amount,

              New_Field

          FROM

          [Sample Data (2).xlsx]

          (ooxml, embedded labels, table is Sheet1);

           

          Left Join(Table)

          LOAD User,

            Min(Month_Filter) as Month_Filter,

            1 as Flag

          Resident Table

          Where New_Field = 'OK'

          Group By User;

           

          FinalTable:

          LOAD User,

            Month_Filter,

            New_Amount,

            New_Field,

            If(Flag = 1, 'TRUE', 'FALSE') as [Desired Output]

          Resident Table;

           

          DROP Table Table;