Search code examples
palantir-foundryfoundry-contour

Is there a way to create dynamic parameter?


I have filter for my dataset:

Keep rows where date is on or after $filter_date

Can I set parameter $filter_date to be 60 days (or 8 weeks or 2 months) away from today?


Solution

  • Great question!

    You can use an expression paired with a dynamic parameter as such:

    date_diff(current_date(), date1) <= $number_of_days
    

    enter image description here

    You can read more on the date/time functions here: https://www.palantir.com/docs/foundry/contour/expressions-relative-dates/#deriving-relative-dates