Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to change a fixed date in a date YearMonth selected in a filter,set analysis date

I am a new user on Qlik

I have this script :

Count({$<[Début de contrat]={"<=31/08/2018"}>} total [Matricule facturation])

and I try this expression but it doesn't work :

Count({$<[Début de contrat]={"<=$(=[[date fin de mois.autoCalendar.YearMonth]])"}>} total [Matricule facturation])

thanks for help

4 Replies
hic
Former Employee
Former Employee

Try

Count({$<[Début de contrat]={"<=$(=Date(Max([[date fin de mois.autoCalendar.YearMonth]])))"}>} total [Matricule facturation])

Anonymous
Not applicable
Author

It doesn't work

all my shet is base on this script.

I Don't want to replace the date in all the different graph.

So I imagine to use a field with the next end month date in a table

and selected the next date 30/09/2018 to Apply it

hic
Former Employee
Former Employee

I am not sure I understand what you are trying to do... Are you using the expression in the Load script? Then it will not work - you cannot use set analysis there.

If you want to create an end-of-month date in the script you can use the following inside a Load statement:

  ...  ,

  [Début de contrat],

  MonthEnd([Début de contrat]) as [date fin de mois],

  ...

HIC

Anonymous
Not applicable
Author

I' trying to explain better

in my expression Count({$<[Début de contrat]={"<=31/08/2018"}>} total [Matricule facturation])

I replace 31/08/2018 by a variable [date reporting]=31/08/2018 and it's ok

is it possible to select this date in a filter  from a table  [date fin de mois]?

my table date is like that

Capture qlik.JPG