Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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

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

swuehl
MVP
MVP

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), ...