Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

berryandcherry6
Contributor II

Months Comparison in if condition

Hi,

i have below formula

if(match(Date(MonthStart(today())-1,'MMM')='mar','apr')>0,1,2)

If previous month is mar or apr, i need to display as 1.  But it always displays else part. ie 2.

Whats wromg in my code?

Tags (2)
1 Solution

Accepted Solutions
aarkay29
Valued Contributor

Re: Months Comparison in if condition

if(match(Date(MonthStart(today())-1,'MMM'),'Mar','Apr'),1,2)

1 Reply
aarkay29
Valued Contributor

Re: Months Comparison in if condition

if(match(Date(MonthStart(today())-1,'MMM'),'Mar','Apr'),1,2)

Community Browser