6 Replies Latest reply on Aug 28, 2018 9:14 AM by Tushar More

    Current year and prior year

    Pearl.pat.0

      Hi,

       

      I have data for 2017 and 2016 where my calculation for current year is working fine, but when i replace my data with 2018 and 2017 its not working.

      I am using calculation

       

      IIF(DATEPART('year',TODAY())=DATEPART('year',[Year-Month])

      OR

      DATEPART('year',TODAY())-1=DATEPART('year',[Year-Month ]),TRUE,FALSE

      )

       

      Using this calculation when i put  'year',TODAY())-2 it is working. I am looking for something where i don't need to change my calculation when i update my  data connection to 2018 and 2017 and next year 2018 and 2019.

       

       

      Thanks,

      Pearl