<?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: Error on sas code in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Error-on-sas-code/m-p/551188#M7393</link>
    <description>&lt;P&gt;I think the error messages are clear. The variables PRODUCT and SALES are not in the data set SALESBYPRODUCTBYDATE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to actually look at the data set with your own eyes to see what the problem is. You can use PROC PRINT or VIEWTABLE or even PROC CONTENTS.&lt;/P&gt;</description>
    <pubDate>Mon, 15 Apr 2019 18:44:41 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-04-15T18:44:41Z</dc:date>
    <item>
      <title>Error on sas code</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Error-on-sas-code/m-p/551187#M7392</link>
      <description>&lt;PRE&gt;The code

PROC SGPLOT DATA=salesByProductByDate(WHERE=(year = 2015));
VBAR product / RESPONSE=sales GROUP=month GROUPDISPLAY=cluster
STAT=sum DATASKIN=gloss;
XAXIS DISPLAY=(nolabel noticks);
YAXIS GRID;
RUN;

And the error from above code

TITLE '2015 Sales By Product';
 96        &lt;STRONG&gt; PROC SGPLOT DATA=salesByProductByDate(WHERE=(year = 2015));
 97         VBAR product / RESPONSE=sales GROUP=month GROUPDISPLAY=cluster&lt;/STRONG&gt;
 ERROR: Variable PRODUCT not found.
 ERROR: Variable SALES not found.&lt;/PRE&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 18:40:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Error-on-sas-code/m-p/551187#M7392</guid>
      <dc:creator>eduar78</dc:creator>
      <dc:date>2019-04-15T18:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Error on sas code</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Error-on-sas-code/m-p/551188#M7393</link>
      <description>&lt;P&gt;I think the error messages are clear. The variables PRODUCT and SALES are not in the data set SALESBYPRODUCTBYDATE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to actually look at the data set with your own eyes to see what the problem is. You can use PROC PRINT or VIEWTABLE or even PROC CONTENTS.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 18:44:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Error-on-sas-code/m-p/551188#M7393</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-04-15T18:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error on sas code</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Error-on-sas-code/m-p/551216#M7396</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/270732"&gt;@eduar78&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;PRE&gt;The code

PROC SGPLOT DATA=salesByProductByDate(WHERE=(year = 2015));
VBAR product / RESPONSE=sales GROUP=month GROUPDISPLAY=cluster
STAT=sum DATASKIN=gloss;
XAXIS DISPLAY=(nolabel noticks);
YAXIS GRID;
RUN;

And the error from above code

TITLE '2015 Sales By Product';
 96        &lt;STRONG&gt; PROC SGPLOT DATA=salesByProductByDate(WHERE=(year = 2015));
 97         VBAR product / RESPONSE=sales GROUP=month GROUPDISPLAY=cluster&lt;/STRONG&gt;
 ERROR: Variable PRODUCT not found.
 ERROR: Variable SALES not found.&lt;/PRE&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This type of error sometimes comes from thinking that you want information about "product" but forget that the actual variable name is something like "product_number" "product_code" or something else with "product" in the variable name, or sometimes an abbreviations such as "prod". If you have labels assigned sometimes you get used to seeing "Product" and forget the actual variable name behind the label.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 19:35:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Error-on-sas-code/m-p/551216#M7396</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-04-15T19:35:00Z</dc:date>
    </item>
  </channel>
</rss>

