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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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

1 Solution

Accepted Solutions
sunny_talwar

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

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

No problem! did it work for you?

Best,

Sunny

tomhovens
Contributor II
Contributor II
Author

yes (Y)

sunny_talwar

Awesome!