Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
samuel_lin
Creator
Creator

Load Script Loop & Variable "BLANK"

Hello all,

I am giving a shot here.

Here's my script:

MonthLoop:

Load OrderMonth as LoopMonth,

Date(Min([order date])-1) as LoopMax,

Date(Min([order date])-90) as 90,

Date(Min([order date])-180) as 180,

Date(Min([order date])-270) as 270,

Date(Min([order date])-365) as 365

Resident FACTS

Group by OrderMonth;

DateRanges:

Load * Inline [Range

90

180

270

365];

for i = 0 to NoOfRows('MonthLoop')-1

for j = 0 to NoOfRows('DateRanges')-1

let vRange = Chr(39) & Peek('Range',$(j),'DateRange') & Chr(39);

let vMonth = Chr(39) & Peek('LoopMonth',$(i),'MonthLoop') & Chr(39);

let vWhereMin = Chr(39) & Peek($(vRange) ,$(i),'MonthLoop') & Chr(39);

let vWhereMax = Chr(39) & Peek('LoopMax',$(i),'MonthLoop') & Chr(39);

the loops go through with limited load, but MOST of the times, vRange is "" (empty) and vWhereMin also is "" (empty)

any thought why this is the case?

Thanks,

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Well, you peek into a table that doesn't exist. DateRange doesn't exist. But DateRanges does.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Well, you peek into a table that doesn't exist. DateRange doesn't exist. But DateRanges does.


talk is cheap, supply exceeds demand
samuel_lin
Creator
Creator
Author

wow, can't believe how many hours I spent into this DataRanges.....

Thank you!!