2 Replies Latest reply on Oct 19, 2018 8:30 AM by Ankit Bansal

    Can this Calc be simplified?

    Raheel Farooq

      Hi All,

       

      Trying to create a calculated filed filter, for same month in last 3 years; is there a way to simplify it or make it more efficient for performance and second question is how to make it dynamic based on user param selection of n number of months. Thanks

       

       

      [Selected Month] = datetrunc([Time Interval],TODAY())

      or

      [Selected Month]= DATEADD('year',-1,datetrunc([Time Interval],TODAY()))

      or

      [Selected Month] = DATEADD('year',-2,datetrunc([Time Interval],TODAY()))

       

       

      [Selected Month] contains date dimension having 1st date of each month in the date, e.g, 2018-09-01,2018-10-01,2018-11-01,2018-12-03, 2019-01-01 etc

       

      so the above calculation will filter Oct'18, Oct'17 and Oct'16

       

      Thanks

      RF