<?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: Calculating Count and Percentage in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Calculating-Count-and-Percentage/m-p/629921#M19554</link>
    <description>&lt;P&gt;I do see the problem now, the ACTXIMG bars do not appear to be to scale.&lt;/P&gt;
&lt;P&gt;The percentage values show in the hover text is correct though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the problem is your expectation more so than the Proc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The vertical axis statement VALUE= option controls the text labels on the major tick marks but DOES NOT DEFINE those tick values.&amp;nbsp; The tick values must by specified in the ORDER= option.&amp;nbsp; The ACTXIMG major ticks that you are experiencing are not 0 to 100, but you are labeling them so and therein lies the confusion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Change the AXIS statement to&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Axis1 style=1 width=1 minor=none 
  label=(height=9pt font="arial/bold" angle=90  "Percent") 
  value=(height=9pt font="arial" "0%" "10%" "20%" "30%" "40%" "50%" "60%" "70%" "80%" "90%" "100%" )&lt;BR /&gt;
  order = 0 to 100 by 10  /* &amp;lt;---- need this */
;
&lt;/PRE&gt;</description>
    <pubDate>Thu, 05 Mar 2020 19:06:00 GMT</pubDate>
    <dc:creator>RichardDeVen</dc:creator>
    <dc:date>2020-03-05T19:06:00Z</dc:date>
    <item>
      <title>Calculating Count and Percentage</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Calculating-Count-and-Percentage/m-p/626524#M19500</link>
      <description>&lt;P&gt;Hi...I am trying to create graphs for each question and would like to have the count and percentages on each graph. The counts on each bar are correct but the percentages seem to be incorrect. Any suggestion on why the percentages might be incorrect. Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Table12;
    length Response $ 7 Term $ 9 Question $ 105 ;
    format Response $char7. Term $char9. Question $char105.;
    informat Response $char7. Term $char9. Question$char105.;
    infile datalines4 dlm='7F'x missover dsd;
    input Response : $char7. Term : $char9. Question : $char105.;
datalines4;
Agree&amp;#127;June 2019&amp;#127;I feel better prepared for the workplace because of taking this program.
Agree&amp;#127;June 2019&amp;#127;I feel better prepared for the workplace because of taking this program.
Agree&amp;#127;June 2019&amp;#127;I feel better prepared for the workplace because of taking this program.
Agree&amp;#127;June 2019&amp;#127;I feel better prepared for the workplace because of taking this program.
Agree&amp;#127;June 2019&amp;#127;I feel better prepared for the workplace because of taking this program.
Agree&amp;#127;June 2019&amp;#127;I feel better prepared for the workplace because of taking this program.
Agree&amp;#127;June 2019&amp;#127;I feel better prepared for the workplace because of taking this program.
Agree&amp;#127;June 2019&amp;#127;I feel better prepared for the workplace because of taking this program.
Agree&amp;#127;June 2019&amp;#127;I feel better prepared for the workplace because of taking this program.
Agree&amp;#127;June 2019&amp;#127;I feel better prepared for the workplace because of taking this program.
Agree&amp;#127;June 2019&amp;#127;I feel better prepared for the workplace because of taking this program.
Agree&amp;#127;June 2019&amp;#127;I feel better prepared for the workplace because of taking this program.
Agree&amp;#127;June 2019&amp;#127;I feel better prepared for the workplace because of taking this program.
Agree&amp;#127;June 2019&amp;#127;I feel better prepared for the workplace because of taking this program.
Agree&amp;#127;June 2019&amp;#127;I feel better prepared for the workplace because of taking this program.
Missing&amp;#127;June 2019&amp;#127;I feel better prepared for the workplace because of taking this program.
Missing&amp;#127;June 2019&amp;#127;I feel better prepared for the workplace because of taking this program.
Neutral&amp;#127;June 2019&amp;#127;I feel better prepared for the workplace because of taking this program.
Neutral&amp;#127;June 2019&amp;#127;I feel better prepared for the workplace because of taking this program.
Agree&amp;#127;June 2019&amp;#127;I had a good understanding of what I would learn in this program.
Agree&amp;#127;June 2019&amp;#127;I had a good understanding of what I would learn in this program.
Agree&amp;#127;June 2019&amp;#127;I had a good understanding of what I would learn in this program.
Agree&amp;#127;June 2019&amp;#127;I had a good understanding of what I would learn in this program.
Agree&amp;#127;June 2019&amp;#127;I had a good understanding of what I would learn in this program.
Agree&amp;#127;June 2019&amp;#127;I had a good understanding of what I would learn in this program.
Agree&amp;#127;June 2019&amp;#127;I had a good understanding of what I would learn in this program.
Disagree&amp;#127;June 2019&amp;#127;I had a good understanding of what I would learn in this program.
Disagree&amp;#127;June 2019&amp;#127;I had a good understanding of what I would learn in this program.
Missing&amp;#127;June 2019&amp;#127;I had a good understanding of what I would learn in this program.
Neutral&amp;#127;June 2019&amp;#127;I had a good understanding of what I would learn in this program.
Neutral&amp;#127;June 2019&amp;#127;I had a good understanding of what I would learn in this program.
Neutral&amp;#127;June 2019&amp;#127;I had a good understanding of what I would learn in this program.
Neutral&amp;#127;June 2019&amp;#127;I had a good understanding of what I would learn in this program.
Neutral&amp;#127;June 2019&amp;#127;I had a good understanding of what I would learn in this program.
Neutral&amp;#127;June 2019&amp;#127;I had a good understanding of what I would learn in this program.
Neutral&amp;#127;June 2019&amp;#127;I had a good understanding of what I would learn in this program.
Neutral&amp;#127;June 2019&amp;#127;I had a good understanding of what I would learn in this program.
Neutral&amp;#127;June 2019&amp;#127;I had a good understanding of what I would learn in this program.
;;;;


Axis1 style=1 width=1 minor=none label=(height=9pt font="arial/bold" angle=90  "Percent") value=(height=9pt font="arial" "0%" "10%" "20%" "30%" "40%" "50%" "60%" "70%" "80%" "90%" "100%");
Axis2 style=1 width=2 label=(height=9pt font="arial/bold"   "Response") value=(height=9pt font="arial");
Axis3 label=(height=9pt font="arial/bold"   "Term") value=(height=9pt font="arial");

proc gchart data=Table12;
	vbar Response / discrete group=Term type=percent inside=percent outside=freq nolegend g100
		coutline=black raxis=axis1 maxis=axis2 gaxis=axis3 woutline=1 patternid=midpoint width=20;
	by Question ;
run; 
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Feb 2020 17:35:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Calculating-Count-and-Percentage/m-p/626524#M19500</guid>
      <dc:creator>twildone</dc:creator>
      <dc:date>2020-02-21T17:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Count and Percentage</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Calculating-Count-and-Percentage/m-p/626733#M19501</link>
      <description>&lt;P&gt;What percentages were you expecting to see ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible GROUP=TERM G100 is computing percentages different than you expectation ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The chart numbers do appear correct.&amp;nbsp; These are the numbers I see&lt;/P&gt;
&lt;PRE&gt;Question 1&lt;BR /&gt;June 2019&lt;BR /&gt;Response   N    %   (fraction)
Agree&amp;nbsp; &amp;nbsp;&amp;nbsp; 15   79    15/19
Missing    2   10.5   2/19&lt;BR /&gt;Neutral    2   10.5   2/19
&lt;BR /&gt;Question 2&lt;BR /&gt;June 2019&lt;BR /&gt;Agree      7   36.8   7/19&lt;BR /&gt;Disagree   2   10.5   2/19&lt;BR /&gt;Missing    1    5.3   1/19&lt;BR /&gt;Neutral    9   47.4   9/19&lt;/PRE&gt;</description>
      <pubDate>Sun, 23 Feb 2020 17:31:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Calculating-Count-and-Percentage/m-p/626733#M19501</guid>
      <dc:creator>RichardDeVen</dc:creator>
      <dc:date>2020-02-23T17:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Count and Percentage</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Calculating-Count-and-Percentage/m-p/626874#M19503</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;Hi Richard....thanks for your response. When I set device equal png (&lt;FONT color="#0000ff"&gt;goptions&lt;/FONT&gt; &lt;FONT color="#0000ff"&gt;device&lt;/FONT&gt;=&lt;FONT color="#008000"&gt;png&lt;/FONT&gt;;), the calculation of the percentage is correct but the percentage values that I specified for the y axis is not recognized. When I set device equal to actximg, the percentage calculation are different.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 14:39:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Calculating-Count-and-Percentage/m-p/626874#M19503</guid>
      <dc:creator>twildone</dc:creator>
      <dc:date>2020-02-24T14:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Count and Percentage</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Calculating-Count-and-Percentage/m-p/629921#M19554</link>
      <description>&lt;P&gt;I do see the problem now, the ACTXIMG bars do not appear to be to scale.&lt;/P&gt;
&lt;P&gt;The percentage values show in the hover text is correct though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the problem is your expectation more so than the Proc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The vertical axis statement VALUE= option controls the text labels on the major tick marks but DOES NOT DEFINE those tick values.&amp;nbsp; The tick values must by specified in the ORDER= option.&amp;nbsp; The ACTXIMG major ticks that you are experiencing are not 0 to 100, but you are labeling them so and therein lies the confusion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Change the AXIS statement to&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Axis1 style=1 width=1 minor=none 
  label=(height=9pt font="arial/bold" angle=90  "Percent") 
  value=(height=9pt font="arial" "0%" "10%" "20%" "30%" "40%" "50%" "60%" "70%" "80%" "90%" "100%" )&lt;BR /&gt;
  order = 0 to 100 by 10  /* &amp;lt;---- need this */
;
&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Mar 2020 19:06:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Calculating-Count-and-Percentage/m-p/629921#M19554</guid>
      <dc:creator>RichardDeVen</dc:creator>
      <dc:date>2020-03-05T19:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Count and Percentage</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Calculating-Count-and-Percentage/m-p/629936#M19556</link>
      <description>&lt;P&gt;Hi Richard....I ran the program and that did the trick....thanks for your help...really appreciate it !!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 20:08:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Calculating-Count-and-Percentage/m-p/629936#M19556</guid>
      <dc:creator>twildone</dc:creator>
      <dc:date>2020-03-05T20:08:40Z</dc:date>
    </item>
  </channel>
</rss>

