Announcing the winners & finalists of the Dataiku Frontrunner Awards 2021! Read their inspiring stories

New column generation (USING FORMULA) based on a set of conditions

Solved!
ranjith
Level 2
New column generation (USING FORMULA) based on a set of conditions

I want to create a new column using an existing one ( A numerical field having values from 0-100) 

I'd like my new column to score the values as

0-15 ->

16-30 ->4   

31-45 ->3 

46-60 -> 2 

61-rest ->1

Can I use formula" on the existing column to achieve this? 

0 Kudos
1 Solution
VinceDS
Dataiker
Dataiker

Hi, 

Yes indeed you can use Formula processor with nested 'if()' conditions to achieve your value remapping.

You can also use "Discretize (bin) Numerical values" from the processor list with a custom raw value remapping and enter your boundaries and target values.

Screenshot 2020-04-01 at 15.35.41.png
 
Hope this helps

View solution in original post

2 Replies
VinceDS
Dataiker
Dataiker

Hi, 

Yes indeed you can use Formula processor with nested 'if()' conditions to achieve your value remapping.

You can also use "Discretize (bin) Numerical values" from the processor list with a custom raw value remapping and enter your boundaries and target values.

Screenshot 2020-04-01 at 15.35.41.png
 
Hope this helps

View solution in original post

ranjith
Level 2
Author

 I actually implemented the binning logic! 

Wasn't sure if that was the right way to go about it though. 

Thanks for the solution + reassurance. Cheers!  🙂

A banner prompting to get Dataiku DSS