1 Reply Latest reply on Sep 11, 2019 1:54 PM by Bryce Larsen

    Filtering with a Date Range with a Relative Date

    Asta MacKie

      Hello!

       

      I'm trying to filter data by a two week range of dates. Ideally, it would be great to capture the upcoming two weeks of data relative to today's date, including the start of the current week (ie, if you're looking at the dashboard on a Tuesday, it would still show you data from the following Monday through the second upcoming Friday, overall capturing two weeks of data). How do I do this?

       

      Thanks!

        • 1. Re: Filtering with a Date Range with a Relative Date
          Bryce Larsen

          If it's based on today's date:

          DATEADD("week", -2, DATETRUNC("week", TODAY()) <= [DateField]

          [DateField] < DATETRUNC("week", TODAY())

          //if you only want weekdays

          //AND DATEPART("weekday", [DateField]) <> 1

          //AND DATEPART("weekday", [DateField]) <> 7

           

          However, if you want you can base it off the max date in the data with something like {MAX([Date Field])} instead of TODAY()