How to filter dates less than current day
I have a dataset that has a list of dates and days of the week, is there a way I can filter my dataset for dates that are less than or equal to the current date?
I tried the formula date = now() but I don't think that's working, it just filters all my data out.
Operating system used: windows
Best Answer
-
tgb417 Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Frontrunner 2022 Finalist, Frontrunner 2022 Winner, Dataiku Frontrunner Awards 2021 Participant, Frontrunner 2022 Participant, Neuron 2023 Posts: 1,598 Neuron
Once you have parsed the dates you can filter in many ways
There is a dedicated date filter step you can add to a visual prepare recipie.
https://doc.dataiku.com/dss/latest/preparation/processors/filter-on-date.html
You can also use the formula filter to filter as well. Here is the documentation for that type of step.
https://doc.dataiku.com/dss/latest/preparation/processors/filter-on-formula.html
Finally this may help in the date section.
https://doc.dataiku.com/dss/latest/preparation/filter-flag.html#filter-on-date-range
However, you must first have a parsed date to do any filtering.
Answers
-
tgb417 Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Frontrunner 2022 Finalist, Frontrunner 2022 Winner, Dataiku Frontrunner Awards 2021 Participant, Frontrunner 2022 Participant, Neuron 2023 Posts: 1,598 Neuron
When it comes to doing calculations, formulas and filtering in Dataiku DSS. You have to parse the dates to the official Java and Dataiku DSS format before trying to do any of these things, This step can be taken in a prepare recipe.
Here is a link to a brief tutorial on the subject
https://knowledge.dataiku.com/latest/data-preparation/dates/concept-date-handling.html
Here is some detailed documentation on the use of dates in Dataiku DSS.https://doc.dataiku.com/dss/latest/preparation/dates.html
Hope this helps a bit
-
tgb417 Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Frontrunner 2022 Finalist, Frontrunner 2022 Winner, Dataiku Frontrunner Awards 2021 Participant, Frontrunner 2022 Participant, Neuron 2023 Posts: 1,598 Neuron