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: 
Not applicable

Month- 1 expression

Hello All,

I am trying to calculate the month of my selection minus 1 month and I am using the expression below:

=Count({<Mois_enquete_calcul={"$(=Date(Max(Mois_enquete_calcul), 'MMM-YYYY')-1)"},Q11={'OUI'}>}Q11)

I think I am missing something as it is giving me 0 which is the wrong figure.

Any idea?

Many Thanks,

Hasvine

1 Solution

Accepted Solutions
Kushal_Chawda

try this

=Count({<Mois_enquete_calcul={"$(=Date(Max(Mois_enquete_calcul)-1, 'MMM-YYYY'))"},Q11={'OUI'}>}Q11)

View solution in original post

3 Replies
Kushal_Chawda

try this

=Count({<Mois_enquete_calcul={"$(=Date(Max(Mois_enquete_calcul)-1, 'MMM-YYYY'))"},Q11={'OUI'}>}Q11)

tresesco
MVP
MVP

If you are looking for previous month, try like:

=Count({<Mois_enquete_calcul={"$(=Date(Addmonths(Max(Mois_enquete_calcul),-1), 'MMM-YYYY'))"},Q11={'OUI'}>}Q11)

Not applicable
Author

Thanks Kush.

It works.

Kind Regards,

Hasvine