Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

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

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

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

MVP
MVP

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

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

Community Browser