3 Replies Latest reply on Apr 16, 2018 5:32 PM by Zhouyi Zhang

    DATE with #01/11/YEAR(NOW())+1

    FRANCK DO

      Hi communauty,

       

      I have a calculation LOD ORIGINAL which i want to automatise IN LOD NEW :

       

      if DATEPART('year', [DATE]) = YEAR(NOW())+2 and

      DATEPART('month', [DATE]) = 3

      and [Filière]="COGE"

      then ({fixed :sum(if [DATE] >=(#01/11/2019#)

      and [DATE] <(#2020/04/1#) and [Filière]="COGE"

      then [SALES] end)} ) end

       

      I want to replace : (#01/11/2019#) AND (#2020/04/1#) By a calculation i made 01/04/ANNEE and 01/11/ANNEE-1

      in order to have :

       

      if DATEPART('year', [DATE]) = YEAR(NOW())+2 and

      DATEPART('month', [DATE]) = 3

      and [Filière]="COGE"

      then ({fixed :sum(if [DATE] >=('#'+[01/11/ANNEE-1]+'#')

      and [DATE] <('#'+[01/04/ANNEE]+'#') and [Filière]="COGE"

      then [SALES] end)} ) end

       

       

       

       

      BUT doesn't work

       

      Thanks a lot

       

      have a good day