Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If load

If nooffailures=0

Load

calendarkey...

where  calendarkey=today()>today()-120;

else

Load

calendarkey...

where  calendarkey=today()>today()-90;

Can any one suggest how to do this requirement.

5 Replies
jcramirez472
Partner - Contributor III
Partner - Contributor III

Can you explain the requirement further? It looks like you want to load a different number of days based on a variable.

Anonymous
Not applicable
Author

Something like this maybe.

if nooffailures=0 then

     let vDateCount=today()-120;

else

     let vDateCount=today()-90;

ENDIF;

Load

     calendarkey

From Yourfile

where calendarkey<today()+1 and calendarkey>$(vDateCount);

Update:  Had to edit for the variable.

Anonymous
Not applicable
Author

Did you get your answer?

Not applicable
Author

Thanks really very good help.

Anonymous
Not applicable
Author

Then please close thread by marking a response as the answer.

Qlik Community Tip: Marking Replies as Correct or Helpful