1 Reply Latest reply on Nov 21, 2015 10:44 AM by Shawn Wallwork

    Subtracting two calculated fields from different time stamp

    Ajinkya Bhonsle

      Hi All,


      I have a forecast report in tableau which has SNAPSHOT_DATE field. We take a snapshot everyday at 06:00 AM. I have created a calculated field called WEEK_NUMBER as per our fiscal calendar. So far I have week 30,31 and 32.


      There are couple of calculated fields like - Q1 FY Quantity,Q2 FY Quantity,Q3 FY Quantity,Q4 FY Quantity, Q1 FY Revenue, Q2 FY Revenue , Q3 FY Revenue and Q4 FY Revenue. I want to create a report called Current vs Prior. The Current data would be for example from WEEK_NUMBER 32. I want to subtract the WEEK_NUMBER - 32 data with WEEK__NUMBER 31 data. In short I want to subtract Q1 FY Quantity from WEEK_NUMBER 32 with Q1 FY Quantity from WEEK_NUMBER 31. The same applies to Q2,Q3 and Q4.


      I wanted to know what formula to include in my calculated field to subtract the data from two different WEEK_NUMBER's.