Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
maniram23
Creator II
Creator II

functions

Hi experts,

how to use 'if' condition in script level? give me one example.

1 Solution

Accepted Solutions
Not applicable

There must be numerous examples available on the community. Below an example for you 🙂

Let vStartDateNum = Num(MakeDate(2013,1,1));

Let vEndDateNum = Num(Today());

Calendar:

LOAD

Date,

Year(Date) as Year,

If(MonthName(Date)=MonthName(Today()),1,0) as CURR_MNTH_FLG,

If(MonthName(Date)=MonthName(MonthStart(AddMonths(Today(),-1))),1,0) as PREV_MNT_FLG;

Load

Date($(vStartDateNum)+RecNo()-1) as Date

AutoGenerate $(vEndDateNum)-$(vStartDateNum)+1;

Regards,

KKR

View solution in original post

1 Reply
Not applicable

There must be numerous examples available on the community. Below an example for you 🙂

Let vStartDateNum = Num(MakeDate(2013,1,1));

Let vEndDateNum = Num(Today());

Calendar:

LOAD

Date,

Year(Date) as Year,

If(MonthName(Date)=MonthName(Today()),1,0) as CURR_MNTH_FLG,

If(MonthName(Date)=MonthName(MonthStart(AddMonths(Today(),-1))),1,0) as PREV_MNT_FLG;

Load

Date($(vStartDateNum)+RecNo()-1) as Date

AutoGenerate $(vEndDateNum)-$(vStartDateNum)+1;

Regards,

KKR