Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data Load For Loop

I'd like to loop through my excel data and and build several items based upon criteria.  I've chosen to use a for loop at this time where one of the data elements in my newly created table uses the for counter and also the where clause.  ie .

For xi = 1 to 12

.

.

.

     month(addmonths(today(),-xi)) as ;

.

.

.

where applicat_report_month << addmonths(today(),-xi);

next xi

it doesn't appear that the where clause is working appropriately.

I'd like to get it so the addmonths is actually calcuated prior to entering the load statment and using a variable in those locations.

thoughts?

thanks

Larry

3 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Is that because you have << instead of < ?

Not applicable
Author

Hi Larry,

Is this WHERE statement your real statement? Are you using literally where applicat_report_month << addmonths(today(),-xi); ?

If so, try it like this: where applicat_report_month < addmonths(today(),-xi);

Regards,

Marina

Not applicable
Author

I have tried bioth ways with an additional item being that as soon as i hit the less than sign <, the tool prompts for one of three choice, (<<, <=, or <>).

The data still doesnt represent the expectation in either case.