Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
Could you please help me with this expression:
=Count({<Mois_enquete_calcul={'>=$(=Max(Mois_enquete_calcul) - 5)<=$(=Max(Mois_enquete_calcul))'},Q11={'OUI'}, MARQUE={'CITROEN'}>}Q11)
Qlikview says that the Expression OK but unfortunately I do not get any result.
Many Thanks,
Hasvine
=Count({<Mois_enquete_calcul={">=$(=Max(Mois_enquete_calcul) - 5)<=$(=Max(Mois_enquete_calcul))"},Q11={'OUI'}, MARQUE={'CITROEN'}>}Q11)
The syntax of the expressions is fine. Please post a small qlikview document that demonstrates the issue.
if Mois_enquete_calcul is in proper date format then below expression should work
Count({<Mois_enquete_calcul={">=$(=Max(Mois_enquete_calcul) - 5)<=$(=Max(Mois_enquete_calcul))"},Q11={'OUI'}, MARQUE={'CITROEN'}>}Q11)
But if Mois_enquete_calcul is in the format of Month-Year.
I used the expression below to calculte it:
Month(subfield([DATE_FACTURATION], ' ' ,1)) & '-' & Year(subfield([DATE_FACTURATION], ' ' ,1)) as Mois_enquete_calcul,
This is how it looks like:
Many thanks to everyone for your help.
Kind Regards,
Hasvine
if you put this Expression in a straight table, what does is stand in the "label header" if you keep it blank and hover over it?
Ok, so it's a text field. The max function doesn't work well with text fields. Try creating it like this:
Date(MonthStart(subfield(DATE_FACTURATION,' ')),'MMM-YYYY') as Mois_enquite_calcul.
It's in not proper date format, do this like below
date(date#(Month(subfield([DATE_FACTURATION], ' ' ,1)) & '-' & Year(subfield([DATE_FACTURATION], ' ' ,1)),'MMM-YYYY'),'MMM-YYYY') as Mois_enquete_calcul
Now your expression should work
Hello All,
Thanks you for your ideas, the good news is that now my chart shows the result but it doesn't give me only 6 months but more.
Following my selection on déc-2015 i want Qlikview to show me the month of nov-2015, oct-2015, sept-2015, aug-2015 and jul-2015
but instead, it is giving me all the months before dec-2015
Any idea how to solve this?
Many Thanks,
Hasvine
Try this,
Count({<Mois_enquete_calcul={">=$(=(Addmonth(Mois_enquete_calcul, - 5)))<=$(=(Addmonth(Mois_enquete_calcul,0)))"},..........