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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.