Magic ETL

Magic ETL

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

  • Coach
    Answer ✓

    You can use a filter with something like:

    1. `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

  • Coach
    Answer ✓

    You can use a filter with something like:

    1. `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.

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In