Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
berryandcherry6
Creator III
Creator III

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?

1 Solution

Accepted Solutions
aarkay29
Specialist
Specialist

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

View solution in original post

1 Reply
aarkay29
Specialist
Specialist

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