<?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: top 10 frequency of one variable and &amp;quot;other&amp;quot; the rest in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/top-10-frequency-of-one-variable-and-quot-other-quot-the-rest/m-p/810779#M319752</link>
    <description>&lt;P&gt;See &lt;A href="https://blogs.sas.com/content/iml/2018/06/04/top-10-table-bar-chart.html" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/iml/2018/06/04/top-10-table-bar-chart.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, this line is the error&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;If A_BirthCountry = not("MYANMAR (BURMA)" or "IRAQ" or "BHUTAN" or "SOMALIA" or "AFGHANISTAN" or "DEMOCRATIC REPUBLIC OF CONGO " 
or "ETHIOPIA" or "BURMA" or "CUBA" or "ERITREA")
then A_birthcountry = "Other";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It should say&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;If A_BirthCountry = not in ("MYANMAR (BURMA)" ,"IRAQ","BHUTAN",
"SOMALIA" ,"AFGHANISTAN","DEMOCRATIC REPUBLIC OF CONGO ",
"ETHIOPIA","BURMA" ,"CUBA","ERITREA") then A_birthcountry = "Other";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please pay attention to details, not that DEMOCRATIC REPUBLIC OF CONGO has a space after it and before the double-quote, maybe that's not what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From now on, please, when there are ERRORs in the log, then show the &lt;FONT color="#FF0000"&gt;ENTIRE&lt;/FONT&gt; log for this DATA step. Do not show us parts of the log, as you have done, we need to see the &lt;FONT color="#FF0000"&gt;ENTIRE&lt;/FONT&gt; log for this DATA step. Please do not say "but it comes with an error that it is invalid error" and tell us nothing further, this is non-informative, we need to see the ENTIRE log for this DATA step.&lt;/P&gt;</description>
    <pubDate>Sat, 30 Apr 2022 09:54:31 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-04-30T09:54:31Z</dc:date>
    <item>
      <title>top 10 frequency of one variable and "other" the rest</title>
      <link>https://communities.sas.com/t5/SAS-Programming/top-10-frequency-of-one-variable-and-quot-other-quot-the-rest/m-p/810763#M319747</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have done this to find the top ten countries with the highest frequency&lt;/P&gt;&lt;P&gt;%let TopN = 10;&lt;BR /&gt;proc freq data=new.resultinterp ORDER=FREQ;&lt;BR /&gt;tables A_BirthCountry / maxlevels=&amp;amp;TopN Plots=FreqPlot;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then I want to put the rest in an "other" category so i started with this data step&lt;/P&gt;&lt;P&gt;data country;&lt;BR /&gt;set new.resultinterp;&lt;BR /&gt;If A_BirthCountry = not("MYANMAR (BURMA)" or "IRAQ" or "BHUTAN" or "SOMALIA" or "AFGHANISTAN" or "DEMOCRATIC REPUBLIC OF CONGO " or "ETHIOPIA" or "BURMA" or "CUBA" or "ERITREA")&lt;BR /&gt;then A_birthcountry = "Other";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please help&lt;/P&gt;&lt;P&gt;but it comes with an error that it is invalid error&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 23:30:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/top-10-frequency-of-one-variable-and-quot-other-quot-the-rest/m-p/810763#M319747</guid>
      <dc:creator>Cooksam13</dc:creator>
      <dc:date>2022-04-29T23:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: top 10 frequency of one variable and "other" the rest</title>
      <link>https://communities.sas.com/t5/SAS-Programming/top-10-frequency-of-one-variable-and-quot-other-quot-the-rest/m-p/810779#M319752</link>
      <description>&lt;P&gt;See &lt;A href="https://blogs.sas.com/content/iml/2018/06/04/top-10-table-bar-chart.html" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/iml/2018/06/04/top-10-table-bar-chart.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, this line is the error&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;If A_BirthCountry = not("MYANMAR (BURMA)" or "IRAQ" or "BHUTAN" or "SOMALIA" or "AFGHANISTAN" or "DEMOCRATIC REPUBLIC OF CONGO " 
or "ETHIOPIA" or "BURMA" or "CUBA" or "ERITREA")
then A_birthcountry = "Other";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It should say&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;If A_BirthCountry = not in ("MYANMAR (BURMA)" ,"IRAQ","BHUTAN",
"SOMALIA" ,"AFGHANISTAN","DEMOCRATIC REPUBLIC OF CONGO ",
"ETHIOPIA","BURMA" ,"CUBA","ERITREA") then A_birthcountry = "Other";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please pay attention to details, not that DEMOCRATIC REPUBLIC OF CONGO has a space after it and before the double-quote, maybe that's not what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From now on, please, when there are ERRORs in the log, then show the &lt;FONT color="#FF0000"&gt;ENTIRE&lt;/FONT&gt; log for this DATA step. Do not show us parts of the log, as you have done, we need to see the &lt;FONT color="#FF0000"&gt;ENTIRE&lt;/FONT&gt; log for this DATA step. Please do not say "but it comes with an error that it is invalid error" and tell us nothing further, this is non-informative, we need to see the ENTIRE log for this DATA step.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2022 09:54:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/top-10-frequency-of-one-variable-and-quot-other-quot-the-rest/m-p/810779#M319752</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-30T09:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: top 10 frequency of one variable and "other" the rest</title>
      <link>https://communities.sas.com/t5/SAS-Programming/top-10-frequency-of-one-variable-and-quot-other-quot-the-rest/m-p/811133#M319937</link>
      <description>&lt;P&gt;Thank you for your help and I tried your new code and this is the error I got&lt;/P&gt;&lt;DIV class=""&gt;NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).&lt;/DIV&gt;&lt;DIV class=""&gt;71:4&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;NOTE: Invalid numeric data, A_BirthCountry='IRAQ' , at line 71 column 4.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;why does it come up as numeric/character?&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 02 May 2022 20:19:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/top-10-frequency-of-one-variable-and-quot-other-quot-the-rest/m-p/811133#M319937</guid>
      <dc:creator>Cooksam13</dc:creator>
      <dc:date>2022-05-02T20:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: top 10 frequency of one variable and "other" the rest</title>
      <link>https://communities.sas.com/t5/SAS-Programming/top-10-frequency-of-one-variable-and-quot-other-quot-the-rest/m-p/811137#M319938</link>
      <description>&lt;P&gt;We don't know what is on line 71. Show us the ENTIRE log for this DATA step, that's 100% of the log for this DATA step, every single line in the log for this data step. Please copy the log as text and then paste it into the window that appears when you click on the &amp;lt;/&amp;gt; icon.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Insert Log Icon in SAS Communities.png" style="width: 859px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66171iFEC370B1DBF07B28/image-size/large?v=v2&amp;amp;px=999" role="button" title="Insert Log Icon in SAS Communities.png" alt="Insert Log Icon in SAS Communities.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 21:15:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/top-10-frequency-of-one-variable-and-quot-other-quot-the-rest/m-p/811137#M319938</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-02T21:15:56Z</dc:date>
    </item>
  </channel>
</rss>

