<?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: plot with one bare based on a value in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/714729#M27313</link>
    <description>&lt;P&gt;Yes only one bar.&lt;/P&gt;
&lt;P&gt;date = today()&lt;/P&gt;
&lt;P&gt;and y axis should be from 0 to 100%&lt;/P&gt;
&lt;P&gt;Also a label in the bar with the number of percentages it is in this case 80%&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jan 2021 18:37:36 GMT</pubDate>
    <dc:creator>mmea</dc:creator>
    <dc:date>2021-01-27T18:37:36Z</dc:date>
    <item>
      <title>plot with one bare based on a value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/714701#M27306</link>
      <description>&lt;P&gt;Hi I have a value for example 0,80 on a date 27/01/2021&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want a plot showing only one bar with the date 27/01/2021 and with a percentage scale, so this bar will reach 80%. The bar should also contain a label "80 %" inside the bar&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;how can I do so?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 18:19:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/714701#M27306</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2021-01-27T18:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: plot with one bare based on a value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/714704#M27307</link>
      <description>&lt;P&gt;Try the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=grstatproc&amp;amp;docsetTarget=n0mc5dtithid5mn13c54dlgaceq3.htm&amp;amp;locale=en" target="_self"&gt;VBARPARM Statement&lt;/A&gt; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Provide sample data if you want a full code answer.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 18:23:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/714704#M27307</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-01-27T18:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: plot with one bare based on a value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/714713#M27308</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
 select distinct wanted_sum into :nobs
 from sumtable_0;
quit;

%put nobs=&amp;amp;nobs; 


**second value;

proc sql;
 select distinct wanted_sum into :kobs
 from sumtable_1;
quit;

%put kobs=&amp;amp;kobs; 

**calculation;

&amp;amp;kobs/&amp;amp;nobs&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I made this macro where I get two different values everyday from my dataset fx in this case the wanted_sum from sumtable_0 is 4559099 and from sumtable_1 it is 3578989&lt;/P&gt;
&lt;P&gt;everyday new numbers appears - these are from today.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then i divide them&amp;nbsp;3578989/4559099&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the result of this should be the one bar plot in percentage.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 18:28:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/714713#M27308</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2021-01-27T18:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: plot with one bare based on a value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/714722#M27310</link>
      <description>&lt;P&gt;I'm not sure I understand. You have a single value 0.8 that you want in a bar chart? That bar chart would have one bar only?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 18:32:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/714722#M27310</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-01-27T18:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: plot with one bare based on a value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/714729#M27313</link>
      <description>&lt;P&gt;Yes only one bar.&lt;/P&gt;
&lt;P&gt;date = today()&lt;/P&gt;
&lt;P&gt;and y axis should be from 0 to 100%&lt;/P&gt;
&lt;P&gt;Also a label in the bar with the number of percentages it is in this case 80%&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 18:37:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/714729#M27313</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2021-01-27T18:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: plot with one bare based on a value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/714743#M27316</link>
      <description>&lt;P&gt;See if you can use this as a template.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data plot;
   x = today();
   y = .8;
run;

proc sgplot data = plot;
   vbarparm category = x response = y / datalabel datalabelattrs = (size = 20);
   yaxis min = 0 max = 1;
   format x date9. y percent.;
   xaxis display = (nolabel);
   yaxis display = (nolabel);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Jan 2021 19:10:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/714743#M27316</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-01-27T19:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: plot with one bare based on a value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/714916#M27333</link>
      <description>&lt;P&gt;Thank you so much!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I got one bar - the bare is very big - is it possible to adjust the size of a bar in the width?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 09:16:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/714916#M27333</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2021-01-28T09:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: plot with one bare based on a value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/714923#M27335</link>
      <description>&lt;P&gt;Sure. Use the Barwidth Option on the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=grstatproc&amp;amp;docsetTarget=n0mc5dtithid5mn13c54dlgaceq3.htm&amp;amp;locale=en#n0mhtmcbdvmstsn1ajh3embjr0jvf" target="_self"&gt;VBARPARM Statement&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data plot;
   x = today();
   y = .8;
run;

proc sgplot data = plot;
   vbarparm category = x response = y / datalabel datalabelattrs = (size = 20) barwidth=.2;
   yaxis min = 0 max = 1;
   format x date9. y percent.;
   xaxis display = (nolabel);
   yaxis display = (nolabel);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="sgplot.PNG" style="width: 647px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54026iC8B99301CB6C2C96/image-size/large?v=v2&amp;amp;px=999" role="button" title="sgplot.PNG" alt="sgplot.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 09:38:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/714923#M27335</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-01-28T09:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: plot with one bare based on a value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/715026#M27338</link>
      <description>&lt;P&gt;Can i make the y-axis go up to 100%&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 15:31:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/715026#M27338</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2021-01-28T15:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: plot with one bare based on a value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/715032#M27339</link>
      <description>&lt;P&gt;Of course. &lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=grstatproc&amp;amp;docsetTarget=n0yjdd910dh59zn1toodgupaj4v9.htm&amp;amp;locale=en" target="_self"&gt;Here is the documentation for the SGPLOT procedure.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You can control the axes by using the XAXIS (horizontal axis) and YAXIS statements (vertical). Look at the MIN= and MAX= options on the YAXIS statement.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 15:40:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/715032#M27339</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-01-28T15:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: plot with one bare based on a value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/715041#M27341</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data = plot;
   vbarparm category = x response = y / datalabel datalabelattrs = (size = 10)barwidth=.2;
   yaxis min = 0 max = 1;
   format x date9. y percent.;
   xaxis display = (nolabel);
   yaxis display = (nolabel);
   Title1 font = 'Calibri' height=16pt "Ande";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;it does not work - can you help&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 16:08:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/715041#M27341</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2021-01-28T16:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: plot with one bare based on a value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/715051#M27342</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data = plot;
   vbarparm category = x response = y / datalabel datalabelattrs = (size = 10)barwidth=.2;
   format x date9. y percent.;
   xaxis display = (nolabel);
   yaxis display = (nolabel) MAX=1;
   Title1 font = 'Calibri' height=16pt "Ande";
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Jan 2021 16:28:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/plot-with-one-bare-based-on-a-value/m-p/715051#M27342</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-01-28T16:28:41Z</dc:date>
    </item>
  </channel>
</rss>

