Dynamic date filter
![emate](https://us.v-cdn.net/6038231/uploads/lithium_attachments/n1936i4DBEF3671C180D84.jpg)
Hi All,
Is there a way to set up a dynamic filter, what I mean by that is, I am connecting my DB to DSS flow, and in my DB I have a data starting from 2014, is there a way to set up a filter that I won't need to update manually for getting only last 24 months from the max date I currently have in my DB?
Thanks,
Best Answer
-
AshleyW Dataiker, Alpha Tester, Dataiku DSS Core Designer, Registered, Product Ideas Manager Posts: 161 DataikerOptions
Hi,
If I’ve understood what you’re trying to do (I'm assuming you already have the data in DSS, among other things...), there’s a few ways you might accomplish this. One way would be to group the dataset to get the max_date, and then to join that resulting max_date back onto every row of the starting dataset. You can then 'filter using formula' in the filter recipe, or use a combination of processor/formulas—diff() will be handy—in the Prepare that will check if the date field you want to filter on is within 24 month of the max_date. When you re-build the datasets in the Flow, the filter will apply the date filter relative to the max_date you generated earlier.
LMK if that helps!
Cheers,
Ashley
Answers
-
emate Dataiku DSS Core Designer, Neuron 2020, Registered, Neuron 2021, Neuron 2022 Posts: 91 ✭✭✭✭✭✭Options
Yes, thank you, you are totally right.