Beast Mode

Beast Mode

Date filter

I have data that has reporting data for every day. I need help creating a quick filter on dashboard when i select it and see last 7 days

Tagged:

Best Answer

  • Coach
    Answer ✓
    1. CASE WHEN `Date` >= CURRENT_DATE() - INTERVAL 6 DAYS AND `Date` <= CURRENT_DATE() THEN 'YES' ELSE 'NO' END

    This will check if your date is within today and 6 days ago (Tuesday - Monday using today as an example) You can tweak it if you want to look at 1-7 days ago.

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

Answers

  • Coach
    Answer ✓
    1. CASE WHEN `Date` >= CURRENT_DATE() - INTERVAL 6 DAYS AND `Date` <= CURRENT_DATE() THEN 'YES' ELSE 'NO' END

    This will check if your date is within today and 6 days ago (Tuesday - Monday using today as an example) You can tweak it if you want to look at 1-7 days ago.

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

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