I would like to create a count sum formula which sums the number of occurrences of a value by a specified column variable.
I want to know by a specified column variable value (i.e. Month) how many times did the same value appear in the column of interest.
Example: Sum Type of Fruit By Month
New Column ( "Count_Fruit_Mo",
numeric,
continuous,
// formula or command TBD
);
| MONTH | FRUIT |
|---|
| 1 | ORANGE |
| 1 | ORANGE |
| 1 | APPLE |
| 2 | ORANGE |
| 2 | APPLE |
| |
// a Summation command appears to function for the entire column, but does not allow specification by another column variable.
// formula( Summation( i = 1, N Row(), :FRUIT == :FRUIT))
// ORANGE = 3; APPLE = 2
I'm hoping to generate,
:Month = 1; :Fruit = "ORANGE"; :Count_Fruit_Mo = 2
:Month = 2; :Fruit = "APPLE"; :Count_Fruit_Mo = 1