Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I can't figure out how to limit this to only for for same ID. Currently my issue is that this peeks from previous ID untill the correct ID has it's first value. I also have calendar here so the first value does not appear on the first date for that ID.
Final:
NoConcatenate
Load
ID,
date,
If(Len(Trim(status)) = 0, Peek('status'), status) as status
Resident Temp
order by date, ID asc;
I tried a for loop but that seems overly complicated.
Cheers,
Pena
Please try:
If(ID =peek(ID) and Len(Trim(status)) = 0, Peek('status'), status) as status
Please try:
If(ID =peek(ID) and Len(Trim(status)) = 0, Peek('status'), status) as status
This seems to work as it leaves the early calendar empty, but I still need to check things.
How does the peek(ID) and Peek('status') "Connect"? I mean how does the ID=Peek(ID) know that it should peek the same row that the later peek does?
Hi ,
Peek works row by row ,so on each row it applies the peek which eventually leads to the right result and yes as mentioned by @Vegar please order the data using order by clause for the rows to appear properly , also check https://help.qlik.com/en-US/sense/April2019/Subsystems/Hub/Content/Sense_Hub/Scripting/InterRecordFu...
for better understanding on peek function
Thanks @Vegar @anushree1 !