7 Replies Latest reply: Aug 28, 2016 4:46 AM by Anil Babu Samineni Branched from an earlier discussion. RSS

    Re: Peek function help

    Anil Babu Samineni

       

       

      I have one small question, Peek(value) returns

       

      returns the value of Value in the previous record read ( equivalent to previous(value) ).

       

      Let's Assume

       

      Name     Value

      A               10

      B               20

      C               30

      D               40

      E               50

       

      If we take, Peek(Value) as Value1, Then how result is visible?

       

      Name     Value        Values

      A               10      

      B               20

      C               30

      D               40

      E               50

        • Re: Peek function help
          Toni Kautto

          Anil, I branched this to a separate thread since it is not a question related directly to the thread where you posted it.

           

          I do not completely understand you question. Can you please provide a sample QVW file where Peek() returns unexpected values?

           

          It is incorrect that Peek() and Previous() are equivalent functions. Please review the definitions in help, Peek ‒ QlikView and Previous ‒ QlikView, and consider the difference by for example applying the functions on your sample data.

           

          LOAD
            *,
            Peek(Value) AS PeekValue,
            Previous(Value) AS PrevValue
          Inline [Name, Value
          A, 10
          B, 20
          C, 30
          D, 40
          E, 50]
          Where Name <> 'C';