12 Replies Latest reply on Aug 14, 2019 10:53 AM by Soumitra Godbole

    Help to get this logic for date calculation

    Daniel Murray

      Hi,

       

      I am trying to replicate this logic.

       

      Current sales is SUM(if MONTH([Orderdate])=8 then [Sales]end)

      Here, i hard coded value 8 which is august month

       

      Prior month is SUM(if MONTH([Orderdate])=7 then [Sales]end)

      here, i hard coded value 7 which is july month

       

      Instead of hard coding the value , i need to get the logic based on month i selected. Example in the month field (order date) if i select july 2019 it should show the current month sales for july 2019 and previous month sales for June 2019.

       

      I need three calculated fields, 1. current month sales, 2. prior month sales, 3. sales change (current sales - prior sales)

       

      Kindly help.