Choose Language Hide Translation Bar
Highlighted
txnelson
Super User

Re: Finding the maximum of a column by matching another column condition

I mistakenly created the Current PMA Counter column as a character string, and it needed to be numeric.....the JSL below seems to work

names default to here(1);
dt=current data table();
dt << New Column( "Current PMA Counter",
	Formula(
		If( Row() == 1,
			x = Col Max( If( Contains( :Condition, "After" ), :PMA Counter, . ) )
		);
		If( Contains( :Condition, "After" ),
			y = x,
			y = .
		);
		y;
	)
);
Jim

View solution in original post

Highlighted
Mikasa
Level I

Re: Finding the maximum of a column by matching another column condition

Great solution
Thanks:)
Article Labels