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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I get a 'between' expression to work?

Hi there,

I need to create an IF statement that contains a 'between' expression but I cant seem to get it to work. Basically I have a formula which is working out the no. of months since a booking date to now and I need it to only show me the entries have a No. of months since booking date between 9 and 12 months.

The formula I have to give me the no. of months is as follows,

((year(today(2))*12)+month(today(2))) - (((year([BookingDate.autoCalendar.Date])*12)+month([BookingDate.autoCalendar.Date])))

Can anyone help?

Thank you!

2 Replies
sunny_talwar
MVP
MVP

I don't think QlikView has a Between function... what is the exact expression you are using?

swuehl
Champion III
Champion III

Louisa, you would need to use two comparisons and a AND logical operator:

If( EXPRESSION >=9 and EXPRESSION <= 12, ....)

or if you check against distinct values, you can use a matching function:

If( Match( EXPRESSION, 9,10,11,12), ...