Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
vikas_nandanwar
Creator II
Creator II

Expression in variables not working

Hi,

I am creating a variable name  - IssueToFinalLT
Definition - 
=IF(([Final Date]-[Issue Date])<3,'< 3 Days',
IF(([Final Date]-[Issue Date])<5,'3 to < 5 Days',
IF(([Final Date]-[Issue Date])<8,'5 to < 8 Days',
IF(([Final Date]-[Issue Date])<15,'8 to < 15 Days','> 15 Days'))))

All my data is getting grouped under '> 15 Days', and i am not getting the error.

Please help
- Vikas

5 Replies
laujerry
Creator
Creator

i think we cant tell anything without your data

we do not know whether the expression is reflecting the truth or it shows sth wrong (not as you expected)

vikas_nandanwar
Creator II
Creator II
Author

Hi there,
I am attaching data excel for your reference.

jonathandienst
Partner - Champion III
Partner - Champion III

Your expression looks OK if used within a suitably dimensioned table. Have you tested replacing the variable with the actual expression? Are they both valid numeric date values?

If either of the dates is null for that row, the expression will return >15 Days.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
vikas_nandanwar
Creator II
Creator II
Author

Yes the date are valid dates and returns a numeric value if calculated individually.

but when used in variable, it returns with  >15 Days only
pleas find attached data file for the same

laujerry
Creator
Creator

try removing the equal sign at the beginning of your variable expression