Hi @Mcc99 ,
There's a couple different ways to do this, but one of the easiest, might be using the Tabulate platform.
Using the sample data table that you provided, you can do it with just a little bit of JSL:
Tabulate(
Add Table(
Column Table( Analysis Columns( :Data A, :Data B ), Statistics( Mean ) ),
Row Table( Grouping Columns( :Subject, :Group ) )
)
);
The corresponding output from the Tabulate platform looks like this:
Which I believe is exactly what you're after. You can of course add more statistics to include or perform the Tabulate in other ways, but I believe this is what you want. You can then click Done and with the red hot button drop-down menu, you can select Make Into Data Table, and then get your data table from the platform (you can also use JSL to do all this for you).
It looks like the previous post you referenced used a column formula instead, which was the other way I would have suggested, but it's already been answered there, so you can always review that post in more detail if that's the way you want to go. But, I really think the Tabulate platform is what you want -- and you can play around with the different grouping columns and so forth to see how the data changes.
Hope this helps!,
DS