2

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?

  • 1
    While Andrew's approach is comprehensive, there is also in-progress feature development work in Contour to support relative date parameters in both the Reports and Contour interfaces. – Logan Rhyne Apr 20 '22 at 14:01

1 Answers1

1

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

fmsf
  • 36,317
  • 49
  • 147
  • 195
Andrew Andrade
  • 2,608
  • 1
  • 17
  • 24
  • thank You for answer. use of parameters is more desired from end-user side, as it gives better UX. 'date_diff(current_date(), date1) <= $number_of_days' ? can you double-check the link You provided, as it gives error "this site can't be reached". – Jonas Reklaitis Apr 21 '22 at 05:59
  • Hi Jonas, yes that should work. Sorry I didn't understand the question well. For the link, you need to replace https://developers.palantirfoundry.com with the link to your Foundry instance. – Andrew Andrade Apr 21 '22 at 11:23