I'm new to using proc SQL, but I'm using it to look at counts of states by race/ethnicity (separate categories).
I want to include a new group called "all" for both race and ethnicity, so it would be combining (for each of race and ethnicity) the total counts for the 2 categories.
What is the easiest way to do this? To create this table, I'm using two separate tables that already have race and ethnicity broken down; would it be easier to modify those primary tables, or somehow create a new variable within the new table?
I'm using two separate tables that already have race and ethnicity broken down
Can you show us a portion of these two tables? Can you show us the desired output?
@SAS93 wrote:
What is the easiest way to do this?
If you want a dataset, use proc Means. If you want a report table, use proc Tabulate.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.