# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
cancel
Showing results for
Did you mean:
Creator

## Load Script Loop & Variable "BLANK"

Hello all,

I am giving a shot here.

Here's my script:

MonthLoop:

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:

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

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

talk is cheap, supply exceeds demand
2 Replies

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

talk is cheap, supply exceeds demand
Creator
Author

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

Thank you!!

Tags
Community Browser