4 Replies Latest reply on Feb 10, 2017 9:35 AM by Peter Galimutti

    Calculating on dateadd field

    Stefan Zehr
      • In my data I have a number of orders, each of them has a "Insert_Time" and "Revenue".
      • in Tableau I calculate the SUM(Revenue) on a daily basis, it looks like this:



      • Now I want to see how the revenue was 7 days ago. So I created a new dimension:
        • DATEADD('day',-7,[Insert Time])
      • In the table above I replaced insert time with this new dimension. The result look like this:


      • As you see, the values of Revenue haven't changed although I am looking an a total different time period.
      • July, 5th should show 4.910, July the 4th should have 4.551 and so on.


      How do I manage to get the results for the correct time period, means the SUM(revenue) from 7 days ago?


      Thank you!