Max value in a column

Solved!
deep_215
Level 2
Max value in a column

Hi,

My requirement is to find the max value of a column and the add that max value will be populated against each row in the dataset as a new column.

For e.g.

Existing dataset

col1col2col3
123ABC
117GDFT
125HDG
135HDI

 

here 35 is the max value for col2. hence it needs to get populated in a new column. new dataset will be as below

col1col2col3col4(New Column)
123ABC35
117GDFT35
125HDG35
135HDI35

 

please help me to get away with this problem. Thanks in advance

 

Regards,

Deepak

0 Kudos
1 Solution
deep_215
Level 2
Author

I used window recipe and was able to fulfill my requirement. i did sorting in descending order on required column and then took first value of that column from aggregate list. with this final result was achieved

View solution in original post

2 Replies
tgb417

@deep_215 

Wondering if you might want to use a window recipe.  From the data you are showing it appears that col1 has the same value all the way down.

This community post might be of help

https://community.dataiku.com/t5/General-Discussion/WINDOW-RECIPE-SUM/m-p/11262

This knowledge base article might also help.

https://knowledge.dataiku.com/latest/courses/advanced-data-prep/visual-recipes-102/window/window-han... 

--Tom
0 Kudos
deep_215
Level 2
Author

I used window recipe and was able to fulfill my requirement. i did sorting in descending order on required column and then took first value of that column from aggregate list. with this final result was achieved