I would like to script a running count or cumulative sum of repeated values within a column.
For example, first appearance should equal 1, max value of count by value specified should equal the cumulative sum of the value within the column.
Ideally, the output for :count_color would not need the data table to be sorted by :color
Using the Eval command under formula generates an output, but all values = 0
Perhaps I have misinterpreted. My column formula is below.
// Running Count
Eval(Eval Expr(Col Sum(Row() <= Expr(Row()), :color)))
New Column( "count",
Format( "Best", 12 ),
Formula( Name Expr( Eval( Eval Expr( Col Sum( Row() <= Expr( Row() ), :color ) ) ) ) )
There is a bug in JMP that you've helped uncover; the resulting table does not include the Name Expr( ) wrapper around the formula when the table's <<getscript command is used. Thanks!