Forum Discussion

Jbot00001's avatar
Jbot00001
Regular Visitor
8 years ago
Solved

HELP: Creating a dynamic filter that "ignores" data based on date.

Hey Forum,

I have a tough one!

We need to create a filter that "ignores" (Filters out) all earlier dates TWO days after Today's date (Today + 2).

Essentially, If today is 23/04, then we need to make the table filter out all information from the 25/04 and back. This needs to be dynamic: move each day in the same way. 

Any help in any direction will be much appreciated!

Thanks,

  • You could add a column to your data that has something like this: 

     

    Column 1 = date(year(now()),month(now()),day(now())+2)

     

    That will return 2 days in the future from whatever the current date is. 

     

    Then add one more column, that compares Column 1 with the Date column in your data.  Like:

     

    Filter Column = DATE >= Column 1

     

    That will return TRUE or FALSE. 

     

    Then just filter your data for the ones that return TRUE from the Filter Column. 

5 Replies

  • mmace1's avatar
    mmace1
    Icon for Impactful Individual rankImpactful Individual

    You could add a column to your data that has something like this: 

     

    Column 1 = date(year(now()),month(now()),day(now())+2)

     

    That will return 2 days in the future from whatever the current date is. 

     

    Then add one more column, that compares Column 1 with the Date column in your data.  Like:

     

    Filter Column = DATE >= Column 1

     

    That will return TRUE or FALSE. 

     

    Then just filter your data for the ones that return TRUE from the Filter Column. 

    • Jbot00001's avatar
      Jbot00001
      Regular Visitor

      Thanks so much for the response Mmace1 - However although the first part is working, when i put in the other part i just get a column of #ERROR. What am i doing wrong?

      This is what I've put in:
      TEST 2 = DATE >='Master Table'[TEST].[Date]

      • mmace1's avatar
        mmace1
        Icon for Impactful Individual rankImpactful Individual

        Sorry, DATE should be the column in your data that has the datestamp on it. 

         

        So I don't know what it's named in your data (I just put 'DATE' in as a placeholder)- but it should be the column that has the date you want to apply this filter to. 

         

        Do I make sense?