Select to view content in your preferred language

Summing a field based on criteria from a temporary variable

238
0
06-15-2023 03:06 PM
JamesC
by
New Contributor

I have a set of years in integer format (Col A) that are used to create a new variable age (Col B) as an integer. This age is then grouped into categories (another variable in Col C). For example Less than15, 16-35, 36-50, Over 50.

That is working fine. My next step is to sum another set of associated numbers (Col D with 3 decimals) from the original dataset within each of the groupings mentioned above.

So my question is how do I calculate the sum of the Col D that is within each grouping? So I would like the sum of all the numbers in Col D that belong to each grouping? These 4 grouped totals would equal the total to all of Col D.

 

Hopefully I described that well enough

0 Kudos
0 Replies