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: 
Not applicable

whats the wrong in my logic

LOAD * INLINE [

     startdate, enddate

     20/07/2015,  30/07/2015

]
;



date1:

load  date(Date#(startdate,'DD/MM/YYYY'),'MM/DD/YYYY') as start_date,

date(Date#(enddate,'DD/MM/YYYY'),'MM/DD/YYYY') as end_date



resident date;



drop table date;

let stratdate1=num(peek(start_date));

let enddate1=num(peek(end_date));







load date($(stratdate1)+IterNo()-1) as startdate1

AutoGenerate 1

while IterNo()<= ($(enddate1) - $(stratdate1));

11 Replies
Kushal_Chawda

what is the error?

Kushal_Chawda

At first sight, you are missing the name of table

date:

LOAD * INLINE [

     startdate, enddate

     20/07/2015,  30/07/2015
]
;

Not applicable
Author


please tell me other than that

PrashantSangle

Hi,

You need to check Peek()

when you say

let stratdate1=num(peek(start_date));

let enddate1=num(peek(end_date));

both are setting same value to variable and when execute below condition

while IterNo()<= ($(enddate1) - $(stratdate1));

It will be always IterNo()<=0 and because of it, you will get error.

try

let stratdate1=num(peek(start_date,1));

let enddate1=num(peek(end_date,-1));

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
tresesco
MVP
MVP

Put single quotes aroung field name in peek(), like:

let stratdate1=num(peek('start_date'));

let enddate1=num(peek('end_date'));

Kushal_Chawda

I think you are missing noconcatenate while taking resident



LOAD * INLINE [

     startdate, enddate

     20/07/2015,  30/07/2015

]
;


date1:
noconcatenate
load  date(Date#(startdate,'DD/MM/YYYY'),'MM/DD/YYYY') as start_date,

date(Date#(enddate,'DD/MM/YYYY'),'MM/DD/YYYY') as end_date



resident date;



drop table date;

qlikviewwizard
Master II
Master II

What is the error?

Can you attach the file with some sample data?

ranganna

Not applicable
Author


Thanks actully how to check errors i am facing lot of problem

Not applicable
Author


Thank you