Assign a "bin" value based on odd or even value in another columnIs it possible to assign a "bin" value based on the number being odd or even. The attached table already has a bin column but i am trying to split this pick list up and making every other part a different bin
Thanks
Even = 1
Odd = 2
Data TableScriptingRe: Assign a "bin" value based on odd or even value in another columntxnelson beat me to it! Anyway, I attached my version of his solution using the mod function, assuming you wanted to do this by row number. Of course, you could use any other numeric value to spit by odd/even this way.
Re: Assign a "bin" value based on odd or even value in another columnAssuming that column SeqNo is the column you want to have the odd and even binning based on the formula for the bin_2 is:
mod( :SeqNo, 2 ) +1;
Mod, or Modulo returns the remainder from dividing the first value by the second value.