Search Locate Previous Next Contents

GroupBy – group variable

When you set a grouping variable (for example you might Barchart Sales grouped by Region) the default is to sum the data into each category defined by the group code. This will give one bar for each unique value in Region, each bar being the total sales for that region.

chBar yield GroupBy farm
View chClose 

You can split the data with a category variable as well as grouping it, which effectively gives you 2-way accumulation as the category split is done first, then the split data is grouped:

chTower yield GroupBy farm SplitBy year
View chClose

It is possible to group a variable on itself. This is very useful for occurrence data; for example a Barchart of Species grouped by Species, with group function ‘Count’ would give one bar per species, counting the number of records logged.

See also ...
CategoriseBy – category variable
GroupFunction – grouping function


Continue to: GroupFunction – grouping function
© Copyright Causeway Graphical Systems Ltd 2003