Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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
New Contributor II

Re: If load

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

atkinsow
Valued Contributor II

Re: If load

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.

atkinsow
Valued Contributor II

Re: If load

Did you get your answer?

Not applicable

Re: If load

Thanks really very good help.

atkinsow
Valued Contributor II

Re: If load

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

Qlik Community Tip: Marking Replies as Correct or Helpful

Community Browser