Formula to include only today's date + last 4 weeks of data

I'm in need of a formula that will allow me to pull only the LAST four weeks of "Ship Date" data so I can get a weekly sales average from said data. I've tried a few variations of trying to use the INTERVAL function paired with < = to no avail.

I need to then take the sales average acquired from the above task and assign a constant of "Today's Date" so it can feed back into the greater ETL of which has future inbound/outbound sales data.

Best Answer

  • GrantSmith
    GrantSmith Coach
    Answer ✓

    You can use a filter with something like:

    `Ship Date` <= CURRENT_DATE() AND `Ship Date` > CURRENT_DATE() - INTERVAL 4 WEEK
    

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**

Answers

  • GrantSmith
    GrantSmith Coach
    Answer ✓

    You can use a filter with something like:

    `Ship Date` <= CURRENT_DATE() AND `Ship Date` > CURRENT_DATE() - INTERVAL 4 WEEK
    

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • @GrantSmith that worked! Always a quick response from you, Thank You.