Hello,
I am trying to use "FOR" and "IF" to create a condition column.
I have this table and I want the "Con" column to indicate if the age in the row after is lower then the current row. if yes "1" if not "0"
| Name | Age | Con |
| David | 23 | 0 |
| Bari | 26 | 1 |
| James | 12 | 0 |
| Lora | 14 | 0 |
This is what I have: (doesn't work)
dt<< New Column( "Con", Formula( For( i = 1,i <= N Row( dt ), i++, If(:Age[i] >= :Age[i+1] , "0", "1", ))));
Your help will be appreciated.