Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Bonjour,
Je me permets de vous écrire suite à une difficulté que j’ai rencontré lors de la comparaison des valeurs de Nbr logements sur la période YearTodate(Max(month)) par rapport à Nbr logements sur la même période (même nombre de mois ) sur Year -1.
YearToDate - Current Year
=sum({<Datefield={">=$(=Date(yearstart(Max(Datefield))))<=$(=Date(Max(Datefield)))"}>}SomeMeasure)
YearToDate - Previous Year
=sum({<Datefield={">=$(=Date(yearstart(Max(Datefield),-1)))<=$(=Date(Addyears(Max(Datefield),-1)))"}>}SomeMeasure)
MonthToDate - Current Year
=sum({<Datefield={">=$(=Date(monthstart(Max(Datefield))))<=$(=Date(Max(Datefield)))"}>}SomeMeasure)
MonthToDate - Previous Year
=sum({<Datefield={">=$(=Date(Addyears(monthstart(Max(Datefield)),-1)))<=$(=Date(Addyears(Max(Datefield),-1)))"}>}SomeMeasure)
YearToDate - Current Year
=sum({<Datefield={">=$(=Date(yearstart(Max(Datefield))))<=$(=Date(Max(Datefield)))"}>}SomeMeasure)
YearToDate - Previous Year
=sum({<Datefield={">=$(=Date(yearstart(Max(Datefield),-1)))<=$(=Date(Addyears(Max(Datefield),-1)))"}>}SomeMeasure)
MonthToDate - Current Year
=sum({<Datefield={">=$(=Date(monthstart(Max(Datefield))))<=$(=Date(Max(Datefield)))"}>}SomeMeasure)
MonthToDate - Previous Year
=sum({<Datefield={">=$(=Date(Addyears(monthstart(Max(Datefield)),-1)))<=$(=Date(Addyears(Max(Datefield),-1)))"}>}SomeMeasure)
Thank you Vinieme, it worked !