Clay Icon

Dynamic Date Filters for Clay Tables: Last 7 Days Guidance

Β·
Β·

Hi guys, is it possible to put a dynamic filter / a range filter on a date in a Clay table? I.e. filter on fields that are updated in the last 7 days?

  • Avatar of Channeled
    Channeled
    APP
    Β·
    Β·

    Yes, it's possible to add a dynamic or range filter on a date in a Clay table. Here's how you can do it: 1. Click the filters button at the top of your table. 2. In the filter menu, click "+ Add filter". 3. Select the date column you want to filter (e.g., "Last Updated"). 4. Choose the "Greater than" or "Greater or Equal To" comparison operator. 5. Enter a date value 7 days ago. For example, to show records updated in the last 7 days: ** Where: Last Updated ** Operator: Greater than * Value: [Enter date 7 days ago] This will dynamically filter your table to show only records updated within the last week.

  • Avatar of Mattijs
    Mattijs
    Β·
    Β·

    I don't think this is actually a dynamic filter as this filter doesn't refresh tomorrow (i.e. tomorrow it will still show the filter on the date range initially set and not filter on a 7 day range)

  • Avatar of Channeled
    Channeled
    APP
    Β·
    Β·

    To create a truly dynamic date range filter in Clay that automatically updates, you can use a combination of scheduled columns and date formatting. Here's how: 1. Use the "Format Date/Time" action to create a column with the current date. 2. Set up a scheduled column to run daily, which will update this current date column. 3. Create a filter using this updated date column, comparing it to your "Last Updated" field. This approach ensures your filter dynamically updates each day, always showing records from the last 7 days. If you need further assistance, please request to talk to a person in this chat.

  • Avatar of Mattijs
    Mattijs
    Β·
    Β·

    When trying to do some calculations with date's I can't find the column 'Updated At'. How do I include the default Updated At column in a formula?

  • Avatar of Channeled
    Channeled
    APP
    Β·
    Β·

    To include the default 'Updated At' column in a formula for date calculations, you can directly reference it in your formula without needing to add it as a separate column. Here's how: 1. Create a new column or edit an existing formula column. 2. In the formula, use Updated At to reference the default column. 3. You can then perform date calculations using functions like moment(). For example, to calculate the number of days since the last update: LBKSmoment().diff(moment(Updated At), 'days')LBKSThis formula calculates the difference between the current date and the 'Updated At' date in days. If you need more help, please ask to talk to a person in this chat.

  • Avatar of Mattijs
    Mattijs
    Β·
    Β·

    When trying to make put this formula (moment().diff(moment(Updated At), 'days')) in the formula generator I get the following error: You must use at least one column in your formula. Enter "/" to insert a column in the input box above. How do I fix that?

  • Avatar of Channeled
    Channeled
    APP
    Β·
    Β·

    To fix the error, you need to reference the "Updated At" column correctly in your formula. Here's how: 1. In the formula generator, type "/" to bring up the column selector. 2. Choose "Updated At" from the list of available columns. 3. Your formula should now look like this: moment().diff(moment(/Updated At), 'days') This ensures you're properly referencing the "Updated At" column in your formula. If you still encounter issues, try refreshing your browser (Cmd/Ctrl + Shift + R) to resolve any potential caching problems. If you need further assistance, please request to talk to a person in this chat.

  • Avatar of Channeled
    Channeled
    APP
    Β·
    Β·