We have a number of columns detailing certain characteristics of our clients and I need to see how the proportions of these groups change over time. Using the "percent of total" option in VA gives the percent of each group across all years, but this needs to be subgrouped into each year.
I know I can put indicator columns into the data, but there are up to 15 different characteristics (and hence columns) , with up to 10 levels in each - this equates to a lot of indicator columns (and we quite a number of different tables we need to do this in). The "Percent of SubTotals" option works in this regard in a crosstab, but not in a chart (e.g. bar or line chart). Is there an alternative way of doing this directly within VA?
For Example (dummy data - yes, I'm in Australia):
Year | state |
2010 | nsw |
2010 | qld |
2010 | qld |
2011 | qld |
2011 | nsw |
2011 | nsw |
2012 | qld |
2012 | nsw |
2012 | nsw |
2012 | nsw |
Currently, when charted using "Percent of Total", we will get the follwoing results (on a chart though) because it calculates the percent of OVERALL total, rather than subgrouping across the Year AND State:
2010 | nsw | 10% |
qld | 20% | |
2011 | nsw | 20% |
qld | 10% | |
2012 | nsw | 30% |
qld | 10% |
What I need (on a chart) is:
2010 | nsw | 33% |
qld | 66% | |
2011 | nsw | 66% |
qld | 33% | |
2012 | nsw | 75% |
qld | 25% |
I have made a crosstab and created a "Percent of SubTotals", but this measure is not allowed a chart within VA atm, and it won't correctly split across the Year as category and State as group (or vice-versa).
Hope this makes sense.
We are on SAS Visual Analytics designer version 7.1
Thanks.
What kind of bar chart are you trying to do? If it is a stacked bar chart you might find the "normalize groups to 100%" option useful as described at https://communities.sas.com/t5/SAS-Visual-Analytics/100-Stacked-Bar-Charts/m-p/153329#M602
Kind Regards,
Michelle
What kind of bar chart are you trying to do? If it is a stacked bar chart you might find the "normalize groups to 100%" option useful as described at https://communities.sas.com/t5/SAS-Visual-Analytics/100-Stacked-Bar-Charts/m-p/153329#M602
Kind Regards,
Michelle
Thanks for the quick reply Michelle.
To be honest, I forgot about the normalise groups, and while this works, when the number of levels increases, it does make it a little more difficult to see trends over time. Ultimately I guess I'd like to see the same thing but in a line chart.
I think it will be a matter of indicators for at least some of the variables, as some of the proportions are quite low, and these are obviously the ones we are most interested in. With stacked barcharts or line charts, these tend to get lost. It may just be a matter of "focus" and finetuning where and what we want to look at.
Thanks again
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.