<?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 format cannot format null value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-format-cannot-format-null-value/m-p/437401#M108898</link>
    <description>&lt;P&gt;I'm hoping to group the chart by vermont=1 and vermont=. so that each bar has 2 colors&lt;/P&gt;</description>
    <pubDate>Thu, 15 Feb 2018 02:31:21 GMT</pubDate>
    <dc:creator>vsl2000</dc:creator>
    <dc:date>2018-02-15T02:31:21Z</dc:date>
    <item>
      <title>proc format cannot format null value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-format-cannot-format-null-value/m-p/436963#M108749</link>
      <description>&lt;P&gt;I am trying to group bars in a vbar chart.&lt;/P&gt;&lt;P&gt;The group variable vermont is either 1 or .&lt;/P&gt;&lt;P&gt;I have included a plot grouped by gender to show that it works with that variable, but not vermont&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is my code:&lt;/P&gt;&lt;P&gt;data survey;&lt;BR /&gt;set mylib.thesisdata2;&lt;BR /&gt;run;&lt;BR /&gt;proc format;&lt;BR /&gt;value typev&lt;BR /&gt;1='Vermont'&lt;BR /&gt;.='New Hampshire'&lt;BR /&gt;0='New Hampshire';&lt;BR /&gt;run;&lt;BR /&gt;proc format;&lt;BR /&gt;value typeedu&lt;BR /&gt;119='Did not graduate high school'&lt;BR /&gt;120='High school graduate/GED'&lt;BR /&gt;121='Some college education'&lt;BR /&gt;122='4-year college degree'&lt;BR /&gt;123='Graduate degree';&lt;BR /&gt;proc format;&lt;BR /&gt;value typegender&lt;BR /&gt;117='Male'&lt;BR /&gt;118='Female';&lt;BR /&gt;run;&lt;BR /&gt;proc sgplot data=Survey;&lt;BR /&gt;format EDUCATIO typeedu.;&lt;BR /&gt;format VERMONT typev.;&lt;BR /&gt;vbar EDUCATIO/group=VERMONT;&lt;BR /&gt;title 'What is the highest level of education you have completed?';&lt;BR /&gt;run;&lt;BR /&gt;proc sgplot data=Survey;&lt;BR /&gt;format EDUCATIO typeedu.;&lt;BR /&gt;format GENDER typegender.;&lt;BR /&gt;vbar EDUCATIO/group=GENDER;&lt;BR /&gt;title 'What is the highest level of education you have completed?';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ExQbyV.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18512iC5D2D3B58577BBD2/image-size/large?v=v2&amp;amp;px=999" role="button" title="ExQbyV.png" alt="ExQbyV.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ExQbyG.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18513iD835D3C5829BF5DF/image-size/large?v=v2&amp;amp;px=999" role="button" title="ExQbyG.png" alt="ExQbyG.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2018 02:56:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-format-cannot-format-null-value/m-p/436963#M108749</guid>
      <dc:creator>vsl2000</dc:creator>
      <dc:date>2018-02-14T02:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: proc format cannot format null value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-format-cannot-format-null-value/m-p/436976#M108752</link>
      <description>&lt;P&gt;It looks like you don't have the value in your data set.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run both of these and post the results please:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=survey;
table vermont;
format vermont;
run;

proc freq data=survey;
table vermont;
format vermont typev.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/185903"&gt;@vsl2000&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I am trying to group bars in a vbar chart.&lt;/P&gt;
&lt;P&gt;The group variable vermont is either 1 or .&lt;/P&gt;
&lt;P&gt;I have included a plot grouped by gender to show that it works with that variable, but not vermont&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here is my code:&lt;/P&gt;
&lt;P&gt;data survey;&lt;BR /&gt;set mylib.thesisdata2;&lt;BR /&gt;run;&lt;BR /&gt;proc format;&lt;BR /&gt;value typev&lt;BR /&gt;1='Vermont'&lt;BR /&gt;.='New Hampshire'&lt;BR /&gt;0='New Hampshire';&lt;BR /&gt;run;&lt;BR /&gt;proc format;&lt;BR /&gt;value typeedu&lt;BR /&gt;119='Did not graduate high school'&lt;BR /&gt;120='High school graduate/GED'&lt;BR /&gt;121='Some college education'&lt;BR /&gt;122='4-year college degree'&lt;BR /&gt;123='Graduate degree';&lt;BR /&gt;proc format;&lt;BR /&gt;value typegender&lt;BR /&gt;117='Male'&lt;BR /&gt;118='Female';&lt;BR /&gt;run;&lt;BR /&gt;proc sgplot data=Survey;&lt;BR /&gt;format EDUCATIO typeedu.;&lt;BR /&gt;format VERMONT typev.;&lt;BR /&gt;vbar EDUCATIO/group=VERMONT;&lt;BR /&gt;title 'What is the highest level of education you have completed?';&lt;BR /&gt;run;&lt;BR /&gt;proc sgplot data=Survey;&lt;BR /&gt;format EDUCATIO typeedu.;&lt;BR /&gt;format GENDER typegender.;&lt;BR /&gt;vbar EDUCATIO/group=GENDER;&lt;BR /&gt;title 'What is the highest level of education you have completed?';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ExQbyV.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18512iC5D2D3B58577BBD2/image-size/large?v=v2&amp;amp;px=999" role="button" title="ExQbyV.png" alt="ExQbyV.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ExQbyG.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18513iD835D3C5829BF5DF/image-size/large?v=v2&amp;amp;px=999" role="button" title="ExQbyG.png" alt="ExQbyG.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2018 03:16:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-format-cannot-format-null-value/m-p/436976#M108752</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-14T03:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: proc format cannot format null value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-format-cannot-format-null-value/m-p/436999#M108766</link>
      <description>&lt;P&gt;Perhaps the 119 in your data is really 119 +/- some small value?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2018 06:42:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-format-cannot-format-null-value/m-p/436999#M108766</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-02-14T06:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: proc format cannot format null value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-format-cannot-format-null-value/m-p/437070#M108791</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Exprocfreq.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18527i68DBFBFD077F03AE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Exprocfreq.png" alt="Exprocfreq.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2018 13:04:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-format-cannot-format-null-value/m-p/437070#M108791</guid>
      <dc:creator>vsl2000</dc:creator>
      <dc:date>2018-02-14T13:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: proc format cannot format null value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-format-cannot-format-null-value/m-p/437161#M108824</link>
      <description>&lt;P&gt;Well, you only have&amp;nbsp;2 value, a 1 or . for VERMONT, so you're getting exactly what I'd expect to see based on your code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are you expecting that's not happening?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/185903"&gt;@vsl2000&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Exprocfreq.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18527i68DBFBFD077F03AE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Exprocfreq.png" alt="Exprocfreq.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2018 15:54:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-format-cannot-format-null-value/m-p/437161#M108824</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-14T15:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: proc format cannot format null value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-format-cannot-format-null-value/m-p/437191#M108834</link>
      <description>&lt;P&gt;The GROUP variable cannot have &lt;STRONG&gt;missing values&lt;/STRONG&gt; if you want information to display in a group. Take a pass through a data step and change:&lt;/P&gt;
&lt;P&gt;if Vermont=. then Vermont=0;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2018 16:20:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-format-cannot-format-null-value/m-p/437191#M108834</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-02-14T16:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: proc format cannot format null value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-format-cannot-format-null-value/m-p/437401#M108898</link>
      <description>&lt;P&gt;I'm hoping to group the chart by vermont=1 and vermont=. so that each bar has 2 colors&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 02:31:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-format-cannot-format-null-value/m-p/437401#M108898</guid>
      <dc:creator>vsl2000</dc:creator>
      <dc:date>2018-02-15T02:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: proc format cannot format null value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-format-cannot-format-null-value/m-p/437407#M108900</link>
      <description>&lt;P&gt;Both . and 1 are assigned to Vermont which means they're grouped together.&lt;/P&gt;
&lt;P&gt;Call the missing one Vermont - Missing or something else and see if that works for you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 03:01:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-format-cannot-format-null-value/m-p/437407#M108900</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-15T03:01:16Z</dc:date>
    </item>
  </channel>
</rss>

