Hello everyone,
How to fill the column Param3 so that we have ones from the matching position (coming from the comparison of column Param1 and Param2) till the end of each item group (see the picture bellow)?

What I have now are only values in Param3 based on matching of Param1 and Param2. For that I use this really simple code:
For( i = 1, i <= N Rows( dt ), i++,
If( dt:Param1[i] == dt:Param2[i],
dt:Param3[i] = 1;
)
);

How to fill the Param3 column for further rows as shown in the first picture? I would appreciate for any suggestions.
Thank you and best regards
Perhaps this will work:
Names Default To Here( 1 );
dt = New Table( "Test",
Add Rows( 10 ),
Compress File When Saved( 1 ),
New Column( "item",
Character,
"Nominal",
Set Values( {"item1", "item1", "item1", "item1", "item1", "item2", "item2", "item2", "item2", "item2"} )
),
New Column( "Param1", Character, "Nominal", Set Values( {"", "A", "", "", "", "", "", "B", "", ""} ) ),
New Column( "Param2", Character, "Nominal", Set Values( {"A", "A", "A", "A", "A", "B", "B", "B", "B", "B"} ) ),
New Column( "Param3", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [., ., ., ., ., ., ., ., ., .] ) )
);
Wait( 3 );
group = .;
For Each Row(
If(
dt:Param1 == dt:Param2,
dt:Param3 = 1;
group = dt:Param2;,
dt:Param2 == group, dt:param3 = 1,
.
)
);
Hi Georg,
thank you, it is working as desired
Best regards