I 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?