<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: proc gchart (group % and overall % side by side) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-gchart-group-and-overall-side-by-side/m-p/254171#M48437</link>
    <description>&lt;P&gt;Well, advice one - move to sgplot/graph template language. &amp;nbsp;With this you can overlay as much as you want. &amp;nbsp;You can find examples for almost any type of graph here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/graphicallyspeaking/" target="_blank"&gt;http://blogs.sas.com/content/graphicallyspeaking/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can't find what you want there then post some test data (datastep), and what the output should look like.&lt;/P&gt;</description>
    <pubDate>Thu, 03 Mar 2016 14:40:13 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2016-03-03T14:40:13Z</dc:date>
    <item>
      <title>proc gchart (group % and overall % side by side)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-gchart-group-and-overall-side-by-side/m-p/254161#M48436</link>
      <description>&lt;P&gt;I am creating a bar chart where I display 30 individual charts using the "by statement":&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc gchart data = analytic_file;&lt;/P&gt;
&lt;P&gt;by group_id;&lt;/P&gt;
&lt;P&gt;vbar age_category / type=percent;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The above creates 30 individual charts (for each group) showing the age category percentages for each group_id (great!)&lt;/P&gt;
&lt;P&gt;On each of the 30 charts, I want to show side by side 1) the age_category precentages for the group &amp;nbsp;AND 2) the overall percentages for the entire population (analytic_file, not grouped by groupid). Ex. There are 30% who are 18-25 in groupd A, and 45% who are 18-25 for the entire population.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How would I do this?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 14:18:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-gchart-group-and-overall-side-by-side/m-p/254161#M48436</guid>
      <dc:creator>wave43</dc:creator>
      <dc:date>2016-03-03T14:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: proc gchart (group % and overall % side by side)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-gchart-group-and-overall-side-by-side/m-p/254171#M48437</link>
      <description>&lt;P&gt;Well, advice one - move to sgplot/graph template language. &amp;nbsp;With this you can overlay as much as you want. &amp;nbsp;You can find examples for almost any type of graph here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/graphicallyspeaking/" target="_blank"&gt;http://blogs.sas.com/content/graphicallyspeaking/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can't find what you want there then post some test data (datastep), and what the output should look like.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 14:40:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-gchart-group-and-overall-side-by-side/m-p/254171#M48437</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-03-03T14:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: proc gchart (group % and overall % side by side)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-gchart-group-and-overall-side-by-side/m-p/254181#M48438</link>
      <description>&lt;P&gt;Here is handy cheat sheet for GTL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.sas.com/rnd/app/ODSGraphics/TipSheet_GTL.pdf" target="_blank"&gt;https://support.sas.com/rnd/app/ODSGraphics/TipSheet_GTL.pdf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 14:48:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-gchart-group-and-overall-side-by-side/m-p/254181#M48438</guid>
      <dc:creator>SAS_inquisitive</dc:creator>
      <dc:date>2016-03-03T14:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: proc gchart (group % and overall % side by side)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-gchart-group-and-overall-side-by-side/m-p/254208#M48447</link>
      <description>&lt;P&gt;proc sgplot was defintely the way to go, and solved a couple of my other problems.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I still have the same questions. I want to overlay (or side by side)&amp;nbsp;each of these 35 graphs generated with the by statement:&lt;/P&gt;
&lt;P&gt;A)&lt;/P&gt;
&lt;P&gt;proc sgplot data= analytic_cohort;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;by pat_groupid;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;vbar agecat_clinical;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With the one graph generated by:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;B)&lt;/P&gt;
&lt;P&gt;proc sgplot data= analytic_cohort;&lt;BR /&gt;vbar agecat_clinical;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;B) contains the overall agecat_clinical for the entire population and I want that next to the age_cat clinical for the pat_groupid.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 15:42:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-gchart-group-and-overall-side-by-side/m-p/254208#M48447</guid>
      <dc:creator>wave43</dc:creator>
      <dc:date>2016-03-03T15:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: proc gchart (group % and overall % side by side)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-gchart-group-and-overall-side-by-side/m-p/254254#M48461</link>
      <description>&lt;P&gt;I figure it out. I am using proc freq to come up with percentages for each of the groups individually:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/iml/2012/12/03/show-percentages-for-bar-charts-with-proc-sgplot.html" target="_blank"&gt;http://blogs.sas.com/content/iml/2012/12/03/show-percentages-for-bar-charts-with-proc-sgplot.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then I am merging the output of the two datasets for two new variables: one for the percent overall, and one for the percent for the group.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 17:03:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-gchart-group-and-overall-side-by-side/m-p/254254#M48461</guid>
      <dc:creator>wave43</dc:creator>
      <dc:date>2016-03-03T17:03:44Z</dc:date>
    </item>
  </channel>
</rss>

