1 2 Previous Next 18 Replies Latest reply on Apr 11, 2018 4:15 AM by chowdary v

    Calculate YTD sales Dynamic?

    pavan kumar

      Hi All,

       

      I need to calculate YTD sales Dynamically.

       

      without parameter it is working fine.

      But when i add parameter to Calculated field its throwing an error.

       

      Formula:-

      if [Order Date]<=[YTD Parameter]

      AND

      DATEDIFF('year',[Order Date],[YTD Parameter])=0

      THEN [Sales] END

       

      The problem is with Parameter Data type ie INT

      I tried to Convert [YTD Parameter] using DATETIME.

      Formulla

       

      if [Order Date]<=DATETIME([YTD Parameter])

      AND

      DATEDIFF('year',[Order Date],DATETIME([YTD Parameter]))=0

      THEN [Sales] END

      Its giving NULL value

       

      Any Help?

        1 2 Previous Next