Hi
I am trying to create a sas bargraph that one can then filter on to view specific items.
Suppose the x-axis is the individual number of passes and the y-axis is the count. Then:
Proc Sgplot Data = Inputs;
Vbar = individual_ID;
Run;
should give me that noting that the individual might say play tennis, rugby, soccer and chess then I can add a Group = sport to get a single bar for an individual with stacks on it?
But say I want to filter on just rugby and still track the individual number in the x-axis.
Then finally, what if I want to filter on just on individual number to view more detail into them only across the various sports.
Kindly assist on the latter components
@Kamohelo_A wrote:
Hi
I am trying to create a sas bargraph that one can then filter on to view specific items.
Suppose the x-axis is the individual number of passes and the y-axis is the count. Then:
Proc Sgplot Data = Inputs;
Vbar = individual_ID;
Run;
should give me that noting that the individual might say play tennis, rugby, soccer and chess then I can add a Group = sport to get a single bar for an individual with stacks on it?
There is no equal sign after the VBAR in the VBAR statement. The option GROUP= will add in the sports that the person plays. Is there some reason why you need to ask? You can just run the code and see what happens.
But say I want to filter on just rugby and still track the individual number in the x-axis.
Add this command into PROC SGPLOT.
where sport='Rugby';
Then finally, what if I want to filter on just on individual number to view more detail into them only across the various sports.
Similar solution
where individual_id=7;
Bar charts seem to be a poor choice for displaying this information. A frequency table makes more sense to me (PROC FREQ)
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!
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.