Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

hammermill21
Contributor II

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

Re: Previous Month Expression

May be this

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

3 Replies
PabloTrevisan
Contributor II

Re: Previous Month Expression

Hi Elizabeth, like this?

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

Re: Previous Month Expression

May be this

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

hammermill21
Contributor II

Re: Previous Month Expression

Hey Sunny,

Yeah that worked.

Thank you very much!

Community Browser