4 Replies Latest reply on Dec 5, 2018 7:33 PM by Zhouyi Zhang

    YTD with parameter of month type numeric

    Melany Torres

      Hi There!

       

      I´m trying to create a YTD calculation on my workbook, i have a parameter of month type numeric and i'm using it as a filter comparing with my field of month in my data source (also type numeric) so that according to the month selection, i must bring the accumulated of the year, in addition, in the section of columns I have a field with a function that shows the current year, with the formula : datepart ('year', Today ())

       

       

      So, for my YTD calculation i'm using this formula:

      COUNTD(

      IF YEAR(DATE(str([PERAA_R]))) = [AY]

      AND MONTH(date(str([PERMES_R])))<= MONTH(Date(Str([Mes])))

      THEN

          [VEHICLE_VIN_R]

      END

      )

       

      The result of the formula gives 0 and I do not know what I'm doing wrong.

      I appreciate the help you can give me

       

      Regards