Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
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
col1 | col2 | col3 |
1 | 23 | ABC |
1 | 17 | GDFT |
1 | 25 | HDG |
1 | 35 | HDI |
here 35 is the max value for col2. hence it needs to get populated in a new column. new dataset will be as below
col1 | col2 | col3 | col4(New Column) |
1 | 23 | ABC | 35 |
1 | 17 | GDFT | 35 |
1 | 25 | HDG | 35 |
1 | 35 | HDI | 35 |
please help me to get away with this problem. Thanks in advance
Regards,
Deepak
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
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.
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