Advanced Designer Learning Path is now live! Read More

Assign values based on scenarios

Level 1
Assign values based on scenarios


Following situation: I have ten columns (two for each weekday). For every weekday I have the information of an absolute and a relative number. 

What I want to do: Assign the weekday based on the highest relative number for each row. But if there are two or more columns with the same relative number, assign the weekday with the highest absolute number. If this is also equal for two or more columns, pick one of those days randomly. 

I know that I can cover the first condition with an if-formula but have no clue how to incorporate the second condition.

Thanks for your help!

0 Kudos
1 Reply


What you describe is a good use case for using Python. You will be able to formulate your logic with more functionalities.

We have recently written a useful guide to Python in Dataiku which you can find here:

Hope it helps,


A banner prompting to get Dataiku DSS