Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm new to Qlikview - at least developing scripts and I need to put in three If statements in my load script.
The next three lines are each line I need to calculate in the script:
Effective Date + 365 days as Renewal,
Effective Date <= 365 days AND Agent First Application Date <= 365 days as First Year New Agent,
Effective Date <= 365 days AND Agent First Application Date >= 365 days as First Year Existing Agent
I read the initial code as an If statement within the load as IF(Effective Date + 365 Days, __) as Renewal - is there any values I'd put in the THEN part or do I leave that alone?
Thanks in advance.
Hi
Just leave as it is..date(EffectiveDate+365) as Renewal
Can you say Effective Date <= 365 means? Any thing you compare it?
Sure. The Effective Date is within a year and the First Application Date is also within a year of the first application date - resulting in a new agent.
If the First Application Date is over a year, then it's an existing agent.
Hi
Effective date and first application date are numbers?
If so, Can you provide a sample numbers?
I think, some thing like
Load * ,
Date(Effective Date+365) as Renewal,
if(Num(today()) -num(Effective Date) <= 365 AND Num(today())-num(Agent First Application Date) <= 365,'First Year New Agent',
if(Num(today()) -num(Effective Date) <= 365 AND Num(today()) -num(Agent First Application Date)>= 365,' First Year Existing Agent')) as Agents
From tableName;
Hope that helps