1 Reply Latest reply on Jul 7, 2016 1:44 PM by madhuri.tanniru

    Calculating last 7 days of sales data

    madhuri.tanniru

      Hi,

       

      I am trying to calculate sum of last 7 days of data.

       

      It works fine when I try the following formulas with sample-superstore data, however, I see three dots in each cell when I perform similar calculations connecting to an extract ( data source: SQL server)

       

      Last 7:                         DATEDIFF('day',ATTR([Order Date]), TOTAL(MAX([Order Date])))<7

      Last 7 days Sales:      IF FIRST()==0 THEN WINDOW_SUM(IIF([Last 7], SUM([Sales]), NULL)) ELSE NULL END

       

       

      Any suggestions please?

       

      Thanks,

      -Madhuri