Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

defining variables

hello,
I'm new to QlikView ,I defined a variable in variable Overview and i tried to display it on the dashbaord using a straight table but it didn't return any values, on the contrary it 's returning  the  script itself
example:
variable's name is : " EE1"
definition:
If
(date([Effective Date])> '30/05/2011' or date([Insured Date])> '30/05/2011',$(EE1) =0,
if
(date([Insured Date]) < '01/01/2011',
if
(date([Policy Expiry Date]) < '31/12/2010', $(EE1) =Round((date([Policy Expiry Date])-date([Insured Date]) +1 )/365,0.0001),
if
(date([Policy Expiry Date]) >= '31/12/2010', $(EE1) =Round((date('31/12/2010')-date([Insured Date]) +1 )/365,0.0001),
if
(date([Expiry Date]) < '01/01/2011',
if
(date([Policy Expiry Date]) < '31/12/2010', $(EE1) =Round((date([Policy Expiry Date])-date([Expiry Date]) +1 )/365,0.0001),
if
(date([Policy Expiry Date]) >= '31/12/2010', $(EE1) =Round((date('31/12/2010')-date([Expiry Date]) +1 )/365,0.0001),
if
(date([Insured Date])>= '01/01/2011', $(EE1) =0))))))))
and
if(date([Policy Expiry Date])> date([Expiry Date]),$(EE1) = $(EE1) * (-1))
and when i want to display the values of this variable it returns the script itself..
Please can anyone help me, thanks in advance.
10 Replies
Anonymous
Not applicable
Author

check the date formats of all the fields.. like.. [Effectve Date], [Insured Date], etc... and if possible use fabs everywhere... convert the dates to numbers.. and then run your if conditions... also.. when you have multiple if conditions.. like these.. first breakdown all the if conditions seperately and then check.. if each of these if conditions are working... and which part is getting executed.. like the true part or the else part.. .like this you can debug and find the where the issue lies...

hope that helps..