Create a column with a specific data patternI want to add a column to my data that changes from "1" values to "-1" values every 101 rows. I saw lots of ways to get close but no solution yet. Help appreciated.
Automation and ScriptingRe: Create a column with a specific data patternSo you wish to have repeating pattern of 1, 0.98, 0.96,... -0.96, -0.98, -1?
Re: Create a column with a specific data patternOr first 100 rows of 1 and then 100 rows of -1?
Re: Create a column with a specific data patternJarmo
Second one exactly.
Re: Create a column with a specific data patternYou can do this with different combinations of Row(), Mod(), Floor(), Ceiling()... Here is one example which might do what you are looking for
1 - 2 * Mod(Floor((Row() -1) / 100), 2)
Re: Create a column with a specific data patternHey @SpannerHead ,
These are always fun challenges since there are so many options!
Here another way besides @jthi excellent method
If( Row() < 101,
1,
Lag( :Column 1, 100 ) * -1
)