Count(Rows Selected) & quickly summarize categories (under one or two columns) of rows selected. [1]I have two columns selected once a graph launches (those categorical columns are on the X axis). As a user selects different points over the graph, specific rows are selected (like in normal graphing).
I'm looking for a way to do the following things:
1) Count number of rows selected
2) Identify what category (X coordinate) is selected on the graph (since only one will be selected at a time).
I'm amazed at how much difficulty I'm having with such a simple thing. I keep looking at the scripting index but to no avail.
Re: Count(Rows Selected) & quickly summarize categories (under one or two columns) of rows selecI do have one last followup question though based on the solution you gave me.
In VBA for example there is a function 'countif' where I can specify for a range of cells (N Rows in my case) and count the occurrences of a given item in that column.
I can think of many ways to do this but most of them involve summaries. So say I use that second command you gave me Jim to figure out what element of X is selected. How can I then count the total occurrences of this in the table? (I know that's redundant but like I said there are two x variables and they are linked: months and weeks, so if I select a month, several weeks get selected, etc).
Could I use something like
r = Current Data Table() << get rows where( :height == 60 );
:name[r[Contains( :sex, :sex )]]; followed by the count you suggested?
Re: Count(Rows Selected) & quickly summarize categories (under one or two columns) of rows selecAnd thank YOU for this!
Reading about the Row state handler too as I'm pretty sure I can use this in another similar issue I was having
You guys rock!
Re: Count(Rows Selected) & quickly summarize categories (under one or two columns) of rows selecAlways coming to my aid! Thank you so much Jim. This is perfect and exactly what I needed. Reading a little more on this to see what else I can do 
Re: Count(Rows Selected) & quickly summarize categories (under one or two columns) of rows selecSee Help > Scripting Index > Objects > Data Table > Make Row State Handler
Re: Count(Rows Selected) & quickly summarize categories (under one or two columns) of rows selecHere is a simple script that shows one way to handle the questions you ask
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
dt << bivariate( x( :height ), y( :weight ) );
dt << select rows( {2, 4, 6} );
Show( N Rows( dt << get selected rows ) );
Show( dt:height[(dt << get selected rows)[1]] );