<?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: Counting from multiple columns in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Counting-from-multiple-columns/m-p/680597#M205713</link>
    <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/163484"&gt;@MINX&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sorry I am really new. Where can I add those code above in SAS VA 7.3?&lt;/P&gt;&lt;P&gt;Will the code below works for more than just 3 rows of data?&lt;/P&gt;&lt;PRE&gt;data have;
	infile datalines missover;
	input project $ software1 : $20. number1 software2 : $20. number2 software3 : $20. number3;
	datalines;
A Excel 2 Word 1 Powerpoint 1 
B Word 1 Photoshop 2 Visio 1 
C Powerpoint 3 Excel 1 
; 
run;&lt;/PRE&gt;</description>
    <pubDate>Tue, 01 Sep 2020 02:08:08 GMT</pubDate>
    <dc:creator>stanh</dc:creator>
    <dc:date>2020-09-01T02:08:08Z</dc:date>
    <item>
      <title>Counting from multiple columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-from-multiple-columns/m-p/680353#M205586</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a month-old user of SAS VA 7.3 and have no experience at all for with writing the code.&lt;/P&gt;&lt;P&gt;Here is what I am trying to achieve and hope some of you can help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have loaded my source from an excel file with the following data:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Project&lt;/TD&gt;&lt;TD&gt;Software 1&lt;/TD&gt;&lt;TD&gt;Number of copies&lt;/TD&gt;&lt;TD&gt;Software 2&lt;/TD&gt;&lt;TD&gt;Number of copies&lt;/TD&gt;&lt;TD&gt;Software 3&lt;/TD&gt;&lt;TD&gt;Number of copies&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;Excel&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Word&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Powerpoint&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;Word&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Photoshop&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Visio&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;Powerpoint&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Excel&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to be able to show the above data using a pie chart to show the number of copies used in the projects.&lt;/P&gt;&lt;P&gt;As the software may differ for every project, you may have new software appearing in any of software columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope the problem is clear.&lt;/P&gt;&lt;P&gt;Thank you very much for your help.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 02:47:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-from-multiple-columns/m-p/680353#M205586</guid>
      <dc:creator>stanh</dc:creator>
      <dc:date>2020-08-31T02:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Counting from multiple columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-from-multiple-columns/m-p/680442#M205641</link>
      <description>&lt;P&gt;Firstly, it is better to transpose the horizontal&amp;nbsp;table to vertical. Then you can&amp;nbsp;use&amp;nbsp;PROC GCHART to&amp;nbsp;create pie chart. There are two kinds&amp;nbsp;pie chart:&amp;nbsp;Individual&amp;nbsp;or&amp;nbsp;stacked.&amp;nbsp;I&amp;nbsp;enclosed codes for&amp;nbsp;both chart.&amp;nbsp;You can do&amp;nbsp;further&amp;nbsp;appearance&amp;nbsp;adjustments. It is always good to read SAS documents.&lt;A href="https://documentation.sas.com/?docsetId=graphref&amp;amp;docsetTarget=p13h0w5vhbfvern1a23b0f3lvfyh.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=graphref&amp;amp;docsetTarget=p13h0w5vhbfvern1a23b0f3lvfyh.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;#&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data have;
	infile datalines missover;
	input project $ software1 : $20. number1 software2 : $20. number2 software3 : $20. number3;
	datalines;
A Excel 2 Word 1 Powerpoint 1 
B Word 1 Photoshop 2 Visio 1 
C Powerpoint 3 Excel 1 
; 
run;

***** Transpose from horizontal to vertical ****;
data have2;
	length software $20;
	set have;
	array x software1-software3;
	array y number1-number3;
 	do i=1 to dim(x);
		software = strip(x(i));
		number = y(i);
		output;
	end;
	keep project software number;
run;

***** individual Pie per Project ****;
proc gchart data = have2;
	pie	 software /
 	sumvar=number
	group=project
	type=sum
	nolegend
	slice=outside
	percent=none
	value=outside
	;
run;


***** stacked Pie per Project ****;
PROC GCHART DATA = have2;
	pie	 software /
 	sumvar=number
	subgroup=project
	type=sum
	slice=inside
	percent=none
	value=inside
	coutline=black
	;
run;



&lt;/PRE&gt;</description>
      <pubDate>Mon, 31 Aug 2020 14:24:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-from-multiple-columns/m-p/680442#M205641</guid>
      <dc:creator>MINX</dc:creator>
      <dc:date>2020-08-31T14:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Counting from multiple columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-from-multiple-columns/m-p/680597#M205713</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/163484"&gt;@MINX&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sorry I am really new. Where can I add those code above in SAS VA 7.3?&lt;/P&gt;&lt;P&gt;Will the code below works for more than just 3 rows of data?&lt;/P&gt;&lt;PRE&gt;data have;
	infile datalines missover;
	input project $ software1 : $20. number1 software2 : $20. number2 software3 : $20. number3;
	datalines;
A Excel 2 Word 1 Powerpoint 1 
B Word 1 Photoshop 2 Visio 1 
C Powerpoint 3 Excel 1 
; 
run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Sep 2020 02:08:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-from-multiple-columns/m-p/680597#M205713</guid>
      <dc:creator>stanh</dc:creator>
      <dc:date>2020-09-01T02:08:08Z</dc:date>
    </item>
  </channel>
</rss>

