Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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