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: 
Anonymous
Not applicable

syntax in load for if statements

so, I want to calculate some flag values..  basically, I want to do something like this..

if((personName = 1) and (todaysDate >= fieldStartDate) and (todaysDate <= fieldEndDate), 1, 0), as IsThereaRealPersonHereStatus

can I have this complex if statement in the data load script?

Thanks,

Maria

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I ended up doing personName * (todaysDate >= fieldStartDate) * (todaysDate <= fieldEndDate) as TheresaRealPersonHereStatus

it seems to work.. 

View solution in original post

2 Replies
m_woolf
Master II
Master II

syntax is:

if(personName = 1 and todaysDate >= fieldStartDate and todaysDate <= fieldEndDate, 1, 0) as IsThereaRealPersonHereStatus

Anonymous
Not applicable
Author

I ended up doing personName * (todaysDate >= fieldStartDate) * (todaysDate <= fieldEndDate) as TheresaRealPersonHereStatus

it seems to work..