Hi All,
I'm new! Thank you in advance for the help. I would like to create a filter or script that will allow me to choose certain rows in my table.
Example Table:
Name Test
xx 1
xx 2
yy 1
zz 1
I would like to be able to toggle such that i can see only the rows with the largest value for test (or the smallest)
Largest value for Test end table:
Name Test
xx 2
yy 1
zz 1
Smallest value for Test end table:
Name Test
xx 1
yy 1
zz 1
Thank you!
I
Multiple options. You could choose at least from Select Where with subsets, Tabulate or Summary table.
Here is an example with Select Where and Subsets to create new tables with min and max values:
Names Default To Here(1);
dt = New Table("table",
Add Rows(4),
Compress File When Saved(1),
New Column("Name", Character, "Nominal", Set Values({"xx", "xx", "yy", "zz"})),
New Column("Test",
Numeric,
"Continuous",
Format("Best", 12),
Set Values([1, 2, 1, 1])
)
);
//Maximum table
dt << Select Where(:test == ColMax(:test, :name));
dt << Subset(Selected Rows, Selected columns only(0), Output Table("Largest value for Test end table"));
dt << Clear Select;
//Minimum table
dt << Select Where(:test == ColMin(:test, :name));
dt << Subset(Selected Rows, Selected columns only(0), Output Table("Smallest value for Test end table"));
dt << Clear Select;