<?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: remove a variable while formatting in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443759#M282872</link>
    <description>&lt;P&gt;The format statement just assigns formats.&lt;/P&gt;
&lt;P&gt;To exclude variables, either don't include them in statements (eg that define tables in tabulate or freq), or drop them from datasets using the drop statement or dataset option.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Mar 2018 14:10:38 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-03-08T14:10:38Z</dc:date>
    <item>
      <title>remove a variable while formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443758#M282871</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am writing a format statement and have 'N/A' as a variable that I would like exclude from the crosstabs I am running. Is their a way to write that into my format statement? Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 14:02:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443758#M282871</guid>
      <dc:creator>GS2</dc:creator>
      <dc:date>2018-03-08T14:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: remove a variable while formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443759#M282872</link>
      <description>&lt;P&gt;The format statement just assigns formats.&lt;/P&gt;
&lt;P&gt;To exclude variables, either don't include them in statements (eg that define tables in tabulate or freq), or drop them from datasets using the drop statement or dataset option.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 14:10:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443759#M282872</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-08T14:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: remove a variable while formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443760#M282873</link>
      <description>&lt;P&gt;PS for detailed help, post your code (see &lt;A href="https://communities.sas.com/t5/help/faqpage/faq-category-id/posting?nobounce" target="_blank"&gt;https://communities.sas.com/t5/help/faqpage/faq-category-id/posting?nobounce&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 14:11:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443760#M282873</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-08T14:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: remove a variable while formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443762#M282874</link>
      <description>&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;value&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; $Used_a_recommendation &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'Yes'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'Yes'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'No'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'No'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'N/A'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'N/A'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;This is my code and I want to remove the N/A so that when I crosstabs it does not show up&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 14:21:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443762#M282874</guid>
      <dc:creator>GS2</dc:creator>
      <dc:date>2018-03-08T14:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: remove a variable while formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443765#M282875</link>
      <description>&lt;P&gt;So we're not talking about removing a &lt;EM&gt;variable&lt;/EM&gt;, but removing a &lt;EM&gt;value&lt;/EM&gt;!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to exclude certain values, keep them out of the input to the procedure by using a where= dataset option on the input dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your format does not make sense at all, as it just replaces values with &lt;EM&gt;identical&lt;/EM&gt; values. What were you trying to accomplish with it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 14:27:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443765#M282875</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-08T14:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: remove a variable while formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443768#M282876</link>
      <description>&lt;P&gt;It is part of my larger format statement. I was formatting and running a crosstabs from the format, so I needed that variable in the format to crosstabs against even though I did not want to change any of the values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am just trying to create a chart based of the formatted variables and remove the 'N/A' as it is not needed for my graph.&lt;/P&gt;&lt;P&gt;Your solution would be on my import statement to write a where statement that excludes all the 'N/A's of that specific variable?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have an example of what that would look like? Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 14:33:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443768#M282876</guid>
      <dc:creator>GS2</dc:creator>
      <dc:date>2018-03-08T14:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: remove a variable while formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443772#M282877</link>
      <description>&lt;P&gt;Please post your code of the tabulation/chart procedure.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 14:36:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443772#M282877</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-08T14:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: remove a variable while formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443774#M282878</link>
      <description>&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;freq&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = mylib.a;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;tables&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Used_a_recommendation*Race /&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;list&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;missing&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Used_a_recommendation &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$Used_a_recommendation.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Race &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$Race.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;title&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Table &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;8.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; Used&amp;nbsp;a Recommendation crosstabs by Race;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 14:38:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443774#M282878</guid>
      <dc:creator>GS2</dc:creator>
      <dc:date>2018-03-08T14:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: remove a variable while formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443781#M282879</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data = mylib.a (where=(Used_a_recommendation ne 'N/A'));
tables Used_a_recommendation*Race /list missing;
format Used_a_recommendation $Used_a_recommendation. Race $Race.;
title Table 8. Used a Recommendation crosstabs by Race;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Mar 2018 15:09:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443781#M282879</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-08T15:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: remove a variable while formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443782#M282880</link>
      <description>&lt;P&gt;That worked perfectly. Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 15:11:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443782#M282880</guid>
      <dc:creator>GS2</dc:creator>
      <dc:date>2018-03-08T15:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: remove a variable while formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443785#M282881</link>
      <description>&lt;P&gt;If&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;you had posted the code in your initial post&lt;/LI&gt;
&lt;LI&gt;stated that you did not want the &lt;EM&gt;value&lt;/EM&gt; 'N/A' of variable Used_a_recommendation in your frequeny table&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I could have given you the solution in the first answer. See Maxim 42.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 15:18:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-a-variable-while-formatting/m-p/443785#M282881</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-08T15:18:23Z</dc:date>
    </item>
  </channel>
</rss>

