QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

To find age between two dates

Hello,

my question is for given attachment. I've two tables Opportunity and lead. In opportunity there is Closedate and CreatedDate in Lead table. I want Opportunity Close Date – Lead Creation Date  to compute Age. Can I get solution?

6 Replies

Re: To find age between two dates

How are the records in the Lead table related to those in the Opportunities table? What's the key to link the tables?

talk is cheap, supply exceeds demand
Not applicable

Re: To find age between two dates

That's the main problem which I'm facing to link those tables and get age output. but I saw something link between ConvertedOpportunityId in lead table and Id in Opportunity table.

please get the solution for this Problem.

Contributor III

Re: To find age between two dates

HI

you can use AGE function check it on help

or you can create bucket if(Num(Opportunity Close Date) - Num(Lead Creation Date)<=90, '3months',

If(Num(Opportunity Close Date) - Num(Lead Creation Date)>90<=180,'6 Months',

If(Num(Opportunity Close Date) - Num(Lead Creation Date)>180<=365,'1 year'))) and so on you can create the bucket.

Hope it helps you.

Regards,

Rohit

Not applicable

Re: To find age between two dates

That's the main problem which I'm facing to link those tables and get age output. but I saw something link between ConvertedOpportunityId in lead table and Id in Opportunity table.

please get the solution for this Problem.

Valued Contributor III

Re: To find age between two dates

As Gysbert Asked earlier, I too have the same question before we can make any attempts to help you out/.

Whats the Key field which links both the tables?.

Not applicable

Re: To find age between two dates

That's the main problem which I'm facing to link those tables and get age output. but I saw something link between ConvertedOpportunityId in lead table and Id in Opportunity table.

please get the solution for this Problem.