Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Qlikview Script ignores condition


I have the following table:


NoConcatenate LOAD





            Peek([TotalCostsEndOfMonth]), 0),[TotalCostsEndOfMonth]) as [TotalCostsEndOfMonth],    


Resident [PartCostsCalculation1]

ORDER BY [KeyPart], [CostDate] ASC;

DROP TABLE [PartCostsCalculation1];

The result should only peek the costs of the previous month if the [KeyPart] (article name) equals the previous record right?

Well, thats not the case. In the resulting table the record just copies the TotalCostsEndOfMonth of the previous KeyPart, even if this KeyPart is different.

2 Replies
Contributor II

Re: Qlikview Script ignores condition

Maybe there is an excluding situation between "previous" and ORDER BY.

Remenber that PREVIOUS operates on the INPUT and PEEK on the OUTPUT.

So what  if [KeyPart] field is not sorted ?


Re: Qlikview Script ignores condition

One possiblility is that the condition isNull([TotalCostsEndOfMonth]) isn't kicking in, since there values are blank strings and not NULL.

Try Len(Trim([TotalCostsEndOfMonth]))=0 instead.

See more on NULL handling in QlikView


Community Browser