Formula

Kevin_dataiku8
Level 2
Formula

Hello to all,

I am writing to you because I have a problem with a formula.

Indeed, I will have a column with ID (where we can have duplicates because with different date values) and a column with different dates.

I would like to add a column with the max date and another column with the min date BY ID

Is it possible to do this via a formula?

Thanks for your future answers!

0 Kudos
2 Replies
AlexT
Dataiker

Hi @Kevin_dataiku8 ,

That won't be possible via formula in a Prepare recipe of row-wise operations on your dataset.

You can instead another visual recipe like GroupBy or Window recipe to calculate min/max date based on ID:

https://knowledge.dataiku.com/latest/data-preparation/visual-recipes/concept-group-recipe.html
or 

https://knowledge.dataiku.com/latest/data-preparation/visual-recipes/concept-window-recipe.html

Thanks

0 Kudos
Kevin_dataiku8
Level 2
Author

Hello AlexT,

Thank you very much for your reactivity and your answer ! 

It's noted, thank you ! I'll try to apply your solution or use a code recipe

thanks to you.