Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Help with expression

Hi guys,

I have a date field which I would like to create an expression to look at this field and give me the previous month.

For example

     Month(date_field) -1

But that doesn't work!

So basically if the data is 21/10/2015 I want to get the previous month 21/09/2015

I am interested in the month though and not the actual date.

Hope this all makes sense?!

Thanks !

1 Solution

Accepted Solutions
maxgro
MVP
MVP

month(addmonths(date_field, -1))

View solution in original post

4 Replies
settu_periasamy
Master III
Master III

Try

Addmonths (date,-1)

maxgro
MVP
MVP

month(addmonths(date_field, -1))

ElizaF
Creator II
Creator II

Anonymous
Not applicable
Author

Thanks for your help as always guys!