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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
hammermill21
Creator III
Creator III

Previous Month Expression

I currently have this expression:

=Date(Max(MakeDate(2018,MonthNum,1)),'MMM') & ' ' & Max(Year)

Which shows me the current month and year, but what do I need to add to give me the previous month? I tried adding -1 but that isn't working. Thank you!

1 Solution

Accepted Solutions
sunny_talwar

May be this

=Date(MonthStart(Max(MakeDate(2018, MonthNum, 1)), -1), 'MMM YYYY')

View solution in original post

3 Replies
PabloTrevisan
Partner - Creator II
Partner - Creator II

Hi Elizabeth, like this?

Date(Max(MakeDate(2018,Month(today())-1,1)),'MMM') & ' ' & Year(Today())

sunny_talwar

May be this

=Date(MonthStart(Max(MakeDate(2018, MonthNum, 1)), -1), 'MMM YYYY')

hammermill21
Creator III
Creator III
Author

Hey Sunny,

Yeah that worked.

Thank you very much!