3 Replies Latest reply: Sep 17, 2012 2:20 AM by Göran Hofstedt RSS

    How to use a varibale in peek?

    Göran Hofstedt

      Hi

      I was trying to follow some other post of how to generate a random value to check but I can´t get the variable to work. Can some of you se what I´m doing wrong?

      /Thanks

       

      (http://community.qlik.com/thread/61424?tstart=30)

       

      Load:

      KKIK:

      KKIK_Key,

      ID,

      ....

      From...

       

      LET RandomRow = round(Rand()*(NoOfRows(KKIK_Key)));

      KKIK_RandomCheck:

      LOAD

      peek('KKIK_Key',$('RandomRow'),'KKIK') as KKIK_Key,       

      peek('KKIK_Key',$('RandomRow'),'KKIK') as KKIK_Random_ID

      //peek('KKIK_Key','1','KKIK') as KKIK_RandomCheck_ID        <---- This works, gives me a id to check on

       

      AutoGenerate 1;