Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
kcvernon
Contributor
Contributor

Peek Function returning Null

Hello 

I am trying to populate a variable using peek function and just keeps returning NULL.

I have tried multiple combinations but still no luck, can anybody see anything that I am missing.. driving me insane.

Many thanks

Fractiles:
Load
Fractile(FIELD1, 0.95) AS FRACTILE95,
Resident Table1;

LET vFRACTILE95 = Peek('FRACTILE95', 0, 'Fractiles');

I have checked the table Fractiles and it is populated with only one row.

 

Labels (2)
3 Replies
rubenmarin

Hi, which value is stored in FRACTILE95 on Fractiles table? Maybe decimals separator is messing with the value assigned to the variable.

you can try with: Replace(Peek('FRACTILE95', 0, 'Fractiles'), ',', '.')

Vegar
MVP
MVP

The expression looks OK to me. How did you check your table? Could it be an empty row at the top?

What if you try to fetch the last row instead. Does that help?

LET vFRACTILE95 = Peek('FRACTILE95', -1, 'Fractiles');

Brett_Bleess
Former Employee
Former Employee

If Ruben or Vegar's posts helped, we appreciate it if you return to your thread and use the Accept as Solution button to mark the post(s) that helped you resolve things.  If you figured something else out, please consider posting that and then use the button to mark that post as the solution.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.