<?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: Problem Regarding proc sgpanel in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Problem-Regarding-proc-sgpanel/m-p/732503#M228245</link>
    <description>&lt;P&gt;The errors you see in your log (you did look at the log didn't you?) are because the Panelby statement expects to have one or more &lt;STRONG&gt;variable&lt;/STRONG&gt; names, not values, just like any other BY statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To subset data to a specific range of values you would use a WHERE statement.&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;proc sgpanel data=ufo;
  title 'UFO physical encounters by Location for 1987 and 1988';
  where year in ( 1987 1988);
  panelby year;
  vbar Physical Location;
run;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Apr 2021 14:39:15 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2021-04-09T14:39:15Z</dc:date>
    <item>
      <title>Problem Regarding proc sgpanel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-Regarding-proc-sgpanel/m-p/732380#M228221</link>
      <description>&lt;P&gt;Hello! I have a problem in which I need to u&lt;SPAN class="textLayer--absolute"&gt;se PROC SGPANEL to create a vertical bar graph of UFO physical encounters (physical) by location with&lt;/SPAN&gt;&lt;SPAN class="textLayer--absolute"&gt;&amp;nbsp;the panels being separated by the years 1987 and 1988 (in that order).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="textLayer--absolute"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="textLayer--absolute"&gt;Here's what I have so far:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Read the data into SAS */
proc import 
    out = ufo
    datafile = '/folders/myfolders/sasuser.v94/all_data/extdata/UFO.csv'
    dbms = CSV replace;
    getnames = YES;
run;
proc print data=ufo;
run; 

proc sgpanel data=ufo;
  title 'UFO physical encounters by Location for 1987 and 1988';
  panelby 1987 1988;
  vbar Physical Location;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="textLayer--absolute"&gt;I'm not very familiar with the proc sgpanel syntax. Could someone please help? Thanks in advance!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 00:52:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-Regarding-proc-sgpanel/m-p/732380#M228221</guid>
      <dc:creator>emmad511</dc:creator>
      <dc:date>2021-04-09T00:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Regarding proc sgpanel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-Regarding-proc-sgpanel/m-p/732390#M228223</link>
      <description>&lt;P&gt;Is it like this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgpanel data=ufo(where=(Physical=1 and year in (1987,1988)));
  title 'UFO physical encounters by Location for 1987 and 1988';
  panelby year;
  vbar location;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Apr 2021 04:33:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-Regarding-proc-sgpanel/m-p/732390#M228223</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2021-04-09T04:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Regarding proc sgpanel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-Regarding-proc-sgpanel/m-p/732503#M228245</link>
      <description>&lt;P&gt;The errors you see in your log (you did look at the log didn't you?) are because the Panelby statement expects to have one or more &lt;STRONG&gt;variable&lt;/STRONG&gt; names, not values, just like any other BY statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To subset data to a specific range of values you would use a WHERE statement.&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;proc sgpanel data=ufo;
  title 'UFO physical encounters by Location for 1987 and 1988';
  where year in ( 1987 1988);
  panelby year;
  vbar Physical Location;
run;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 14:39:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-Regarding-proc-sgpanel/m-p/732503#M228245</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-04-09T14:39:15Z</dc:date>
    </item>
  </channel>
</rss>

