Using the ColSum() function with a second argument to specify a By variable should work. The script below recreates your table, using a formula for the third column:
New Table( "Data",
Add Rows( 5 ),
New Column( "ID",
Numeric,
"Continuous",
Set Values( [1, 1, 2, 3, 1] )
),
New Column( "Value",
Numeric,
"Continuous",
Set Values( [5, 6, 9, 1, 2] )
),
New Column( "SumIf",
Numeric,
"Continuous",
Formula( Col Sum( :Value, :ID ) )
)
)
Hope that helps,
Michael
Michael Crotty
Principal Statistical Writer
Manager, Statistical Documentation
JMP Development