<?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: Combining two bar charts in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Combining-two-bar-charts/m-p/272596#M4322</link>
    <description>My question is how to do this in SAS Visual Analytics software rather than base SAS. Thanks!</description>
    <pubDate>Tue, 24 May 2016 01:51:06 GMT</pubDate>
    <dc:creator>Ujjawal</dc:creator>
    <dc:date>2016-05-24T01:51:06Z</dc:date>
    <item>
      <title>Combining two bar charts</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Combining-two-bar-charts/m-p/272541#M4317</link>
      <description>&lt;P&gt;I am new to SAS VA.&amp;nbsp;I am trying to create a bar chart showing comparison of two groups. Data for the 2 groups are in separate files (data sources). I want the chart to be displayed as shown&amp;nbsp;below. Since&amp;nbsp;&lt;SPAN&gt;d&lt;/SPAN&gt;&lt;SPAN&gt;ata for the 2 groups are in separate data sources, i am able to create two bar charts but unable to combine them in a single bar chart showing 2 bars for each of the groups.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3302i038476A381155A75/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="SAS VA.png" title="SAS VA.png" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be highly appreciated. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2016 19:57:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Combining-two-bar-charts/m-p/272541#M4317</guid>
      <dc:creator>Ujjawal</dc:creator>
      <dc:date>2016-05-23T19:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Combining two bar charts</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Combining-two-bar-charts/m-p/272563#M4319</link>
      <description>&lt;P&gt;I'm new, as well, so I'm taking this as a challenge: If you reorganize your data a little, this will give the closest I can get to your picture. The bars are next to each other.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data example;
   infile datalines delimiter=',';
   input turnover $ value group;
   datalines;                      
0-5,45,1
0-5,44,2
5-10,17,1
5-10,20,2
10-15,38,1
10-15,36,2
;

/* general routine:
    http://blogs.sas.com/content/sascom/2011/08/22/how-to-make-a-cluster-grouped-bar-chart-graph-using-sas-sg-procedures/ */
proc sgplot data=example;
  vbar turnover / response=value group=group stat=sum nostatlabel
         groupdisplay=cluster barwidth=0.9 transparency=0;
  xaxis display=(nolabel);
  yaxis grid;
  run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;P&gt;Otherwise, a different method will get the bars on top of each other. you can play around with barwidth and transparency to see what you like:&lt;/P&gt;&lt;BR /&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data example;
   infile datalines delimiter=',';
   input turnover $ group1 group2;
   datalines;                      
0-5,45,44
5-10,17,20
10-15,38,36
;

/* general routine:
    http://blogs.sas.com/content/sascom/2011/08/22/how-to-make-a-cluster-grouped-bar-chart-graph-using-sas-sg-procedures/ */
proc sgplot data=example;
  vbar turnover / response=group1 stat=sum nostatlabel
         groupdisplay=cluster barwidth=0.5 transparency=0.2;
  vbar turnover / response=group2 stat=sum nostatlabel
         groupdisplay=cluster barwidth=0.7 transparency=0.2;
  xaxis display=(nolabel);
  yaxis grid;
  run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 May 2016 20:45:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Combining-two-bar-charts/m-p/272563#M4319</guid>
      <dc:creator>paulkaefer</dc:creator>
      <dc:date>2016-05-23T20:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Combining two bar charts</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Combining-two-bar-charts/m-p/272596#M4322</link>
      <description>My question is how to do this in SAS Visual Analytics software rather than base SAS. Thanks!</description>
      <pubDate>Tue, 24 May 2016 01:51:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Combining-two-bar-charts/m-p/272596#M4322</guid>
      <dc:creator>Ujjawal</dc:creator>
      <dc:date>2016-05-24T01:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Combining two bar charts</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Combining-two-bar-charts/m-p/272599#M4323</link>
      <description>&lt;P&gt;As you've discovered the data needs to be in the same data source for a single visualization/report object. When you are working with a visualization/report object only 1 data source can be selected and therefore you will need to bring your groups together in the same data source if you want a clustered&amp;nbsp;bar chart.&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2016 02:02:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Combining-two-bar-charts/m-p/272599#M4323</guid>
      <dc:creator>MichelleHomes</dc:creator>
      <dc:date>2016-05-24T02:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Combining two bar charts</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Combining-two-bar-charts/m-p/272905#M4361</link>
      <description>&lt;P&gt;Note that your Excel example does not have the data in two different workbooks.&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2016 22:32:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Combining-two-bar-charts/m-p/272905#M4361</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-05-24T22:32:28Z</dc:date>
    </item>
  </channel>
</rss>

