Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
tomhovens
Contributor II
Contributor II

Calculate a variable

Hello Qlikviewers,

I have two variables (varPeildatum, varPlanningsbreedte) and one field (Date). By using the variables i want a selection of

greater then varPeildatum - varPlanningsbreedte - 1 and

less then varPeildatum + varPlanningsbreedte + 1

The reaction I use is:

='>='&varPeildatum-varPlanningsbreedte-1&'<='&varPeildatum+varPlanningsbreedte+1

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

If you are making a selection in date field make sure the format of the date is same as your date field format

='>=' & Date(varPeildatum-varPlanningsbreedte-1, 'yourDateFormat') & '<=' & Date(varPeildatum+varPlanningsbreedte+1, 'yourDateFormat')

HTH

Best,

Sunny

View solution in original post

5 Replies
sunny_talwar
MVP
MVP

If you are making a selection in date field make sure the format of the date is same as your date field format

='>=' & Date(varPeildatum-varPlanningsbreedte-1, 'yourDateFormat') & '<=' & Date(varPeildatum+varPlanningsbreedte+1, 'yourDateFormat')

HTH

Best,

Sunny

tomhovens
Contributor II
Contributor II
Author

Thanks for your quick answer

sunny_talwar
MVP
MVP

No problem! did it work for you?

Best,

Sunny

tomhovens
Contributor II
Contributor II
Author

yes (Y)

sunny_talwar
MVP
MVP

Awesome!