# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Talk to Experts Tuesday, Live Q&A, September 22: Moving from QlikView to Qlik Sense. REGISTER
cancel
Showing results for
Did you mean:
Highlighted
Creator

## IF STATEMENT question month

Hi experts:

I want to do this:

IF Month is Jan then blah blah,

if Month is  Jan + Feb then blah blah.

When I select Jan it works, but when I select Jan + Feb it doesnt work. Whyyyyy??? and how can I make it work. I even used greater than less than and still doesnt work.

=if(MonthNum=1,
(if([Region]='Atlantic',0.0022,
if([Region]='Ontario Sw',-0.0882,
if([Region]='Ontario Ce',-0.0882,
if([Region]='Quebec',0.0913,
if([Region]='West',0.0324,0)))))),
if(Monthnum=1 AND MonthNum=2,
(if([Region]='Atlantic',-0.0069,
if([Region]='Ontario Sw',-0.017526,
if([Region]='Ontario Ce',-0.017526,
if([Region]='Quebec',-0.013556,
if([Region]='West',0.016357,0))))))
,0))

Thanks,

J

2 Replies
Highlighted
MVP & Luminary

Try one of these options:

• =if(MonthNum=1 OR MonthNum=2, ...etc )
• =if(Match(MonthNum,'1', '2'), ... etc)

talk is cheap, supply exceeds demand
Highlighted
MVP

Hi, when asking for a firels, if that field has more than one possible values it will return null(). You need an aggregation funcion that returns one of that many values, ie:
if(Min(MonthNum)=1 AND Max(MonthNum)=2,