<?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: Help with freq summary in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/700025#M214190</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/355545"&gt;@ms400000&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;In real life I'm pulling the initial data off a server which already has formats applied.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;But you can turn off those formats before you do anything else in SAS. And then turn them back on later.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OR EVEN BETTER&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just leave them formatted but don't use VVALUEX. Even though they are formatted they will sort in numerical order, not alphabetical order.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Really, the problem in this situation is VVALUEX, not the formats.&lt;/P&gt;</description>
    <pubDate>Wed, 18 Nov 2020 22:50:39 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-11-18T22:50:39Z</dc:date>
    <item>
      <title>Help with freq summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/699945#M214142</link>
      <description>&lt;P&gt;I have a program that summarizes frequencies across variables. The variables are separate but use the same format. This is fake data but shows what I"m trying to do. It is essentially doing what I want but in FREQTABLE (which is the final table I'm looking for) I would prefer that the first column be the numerical variable showing the label instead of a text string because it currently gets sorted alphabetically instead of by the numerical value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have other similar variables that I am re-using this for so I like that in the current program I don't have to explicitly state the variables throughout. I got a portion of this from another forum post. Hope this makes sense.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;format&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;value city_name&lt;/P&gt;&lt;P&gt;-&lt;STRONG&gt;1&lt;/STRONG&gt;="Out of country"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;="Ann Arbor"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;="Newhaven"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;="Pittsburgh"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;="Richmond"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;5&lt;/STRONG&gt;="Tucson";&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; city;&lt;/P&gt;&lt;P&gt;input City_Q1&amp;nbsp; City_Q2&amp;nbsp; City_Q3&amp;nbsp; City_Q4 ;&lt;/P&gt;&lt;P&gt;format City_Q1 city_name. City_Q2 city_name. City_Q3 city_name. City_Q4 city_name.;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1 1 2 2&lt;/P&gt;&lt;P&gt;2 1 1 3&lt;/P&gt;&lt;P&gt;4 3 3 3&lt;/P&gt;&lt;P&gt;5 2 -1 -1&lt;/P&gt;&lt;P&gt;2 5 5 5&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*This code is an example of how to generate a table with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Variable Name, Variable Value, Frequency, Percent, Cumulative Freq and Cum Pct&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; No macro's are required&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Use Proc Freq to generate the list, list variables in a table statement if only specific variables are desired&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Use ODS Table to capture the output and then format the output into a printable table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *Run frequency for tables;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods table onewayfreqs=temp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;freq&lt;/STRONG&gt; data=work.city;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; table _all_;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *Format output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;data&lt;/STRONG&gt; want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; length variable $32. variable_value $50.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set temp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Variable=scan(table, &lt;STRONG&gt;2&lt;/STRONG&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Variable_Value=strip(trim(vvaluex(variable)));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; keep variable variable_value frequency percent cum:;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; label variable='Variable'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; variable_value='Variable Value';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;SORT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATA=WORK.WANT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OUT=WORK.SORTTempTableSorted&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BY variable_value;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;TRANSPOSE&lt;/STRONG&gt; DATA=WORK.SORTTempTableSorted&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OUT=WORK.FREQTABLE&lt;/P&gt;&lt;P&gt;/*&amp;nbsp;&amp;nbsp; PREFIX=Column */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NAME=Source&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LABEL=Label;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BY variable_value;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID variable;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VAR Frequency;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 18:44:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/699945#M214142</guid>
      <dc:creator>ms400000</dc:creator>
      <dc:date>2020-11-18T18:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Help with freq summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/699953#M214145</link>
      <description>&lt;P&gt;I don't have time to test this, but instead of using VVALUEX to turn numbers -1 through 5 into city names, leave this variable unformatted until you get to the final PROC TRANSPOSE. Then everything is in the -1 through 5 order, not alphabetical order, and you can apply the format thereafter to see the actual city names.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 18:58:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/699953#M214145</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-11-18T18:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help with freq summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/699977#M214157</link>
      <description>&lt;P&gt;In real life I'm pulling the initial data off a server which already has formats applied. Also in temp all of the cities are not in a single variable, which is where I don't know how to bring them over in a different way.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 20:15:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/699977#M214157</guid>
      <dc:creator>ms400000</dc:creator>
      <dc:date>2020-11-18T20:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help with freq summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/699983#M214161</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/355545"&gt;@ms400000&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;In real life I'm pulling the initial data off a server which already has formats applied. Also in temp all of the cities are not in a single variable, which is where I don't know how to bring them over in a different way.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Can you show what you actually expect for the result?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 20:29:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/699983#M214161</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-11-18T20:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help with freq summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/700000#M214173</link>
      <description>The output I want is what is in work.freqtable but ideally in that dataset variable_value would be a numeric variable so that when it's sorted - 1 (out of country) would be the first line</description>
      <pubDate>Wed, 18 Nov 2020 21:29:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/700000#M214173</guid>
      <dc:creator>ms400000</dc:creator>
      <dc:date>2020-11-18T21:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Help with freq summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/700010#M214179</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/355545"&gt;@ms400000&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;The output I want is what is in work.freqtable but ideally in that dataset variable_value would be a numeric variable so that when it's sorted - 1 (out of country) would be the first line&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Show results, as in the actual calculated values given your example data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And following &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;'s suggestion I have to guess, without a concrete example,&lt;/P&gt;
&lt;P&gt;that you want something like:&lt;/P&gt;
&lt;PRE&gt;data city;
input City_Q1  City_Q2  City_Q3  City_Q4 ;
datalines;
1 1 2 2
2 1 1 3
4 3 3 3
5 2 -1 -1
2 5 5 5
;
 
run;
data trans;
   set city;
   array c city: ;
   do i=1 to dim(c);
      city=c[i];
      output;
   end;
   keep city;
run;

proc format;
value city_name
-1="Out of country"
1="Ann Arbor"
2="Newhaven"
3="Pittsburgh"
4="Richmond"
5="Tucson";
run;

proc freq data=trans;
   tables city;
   format city city_name.;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 22:00:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/700010#M214179</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-11-18T22:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with freq summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/700025#M214190</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/355545"&gt;@ms400000&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;In real life I'm pulling the initial data off a server which already has formats applied.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;But you can turn off those formats before you do anything else in SAS. And then turn them back on later.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OR EVEN BETTER&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just leave them formatted but don't use VVALUEX. Even though they are formatted they will sort in numerical order, not alphabetical order.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Really, the problem in this situation is VVALUEX, not the formats.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 22:50:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/700025#M214190</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-11-18T22:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with freq summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/700056#M214204</link>
      <description>&lt;P&gt;My program provides the calculated values I want in work.freqtable, which displays 4 columns of separate frequencies. It is only the order of the rows I'm trying to change.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 23:54:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/700056#M214204</guid>
      <dc:creator>ms400000</dc:creator>
      <dc:date>2020-11-18T23:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help with freq summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/700057#M214205</link>
      <description>&lt;P&gt;Sounds good but simply removing vvaluex gives me an error&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 23:56:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/700057#M214205</guid>
      <dc:creator>ms400000</dc:creator>
      <dc:date>2020-11-18T23:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: Help with freq summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/700090#M214219</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/355545"&gt;@ms400000&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Sounds good but simply removing vvaluex gives me an error&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So, have you even attempted by suggested code example? If so, what is wrong with the output? Since you have not shown what you expect the output to actually look like it is pretty hard to guess 1) what you have run or 2) what you expect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you get an error, best practice on this forum is to copy from the &lt;STRONG&gt;log&lt;/STRONG&gt; the entire data step or procedure with any notes, warnings or other messages and paste the resulting text into a code box opened on the forum with the &amp;lt;/&amp;gt; icon. Use the code box to preserve formatting of any messages and the diagnostic characters that SAS often provides to help identify causes of the messages.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 04:11:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/700090#M214219</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-11-19T04:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help with freq summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/700166#M214261</link>
      <description>Yes, I ran the code you suggested, it provided a single column of frequencies for city_Q1-city_Q4 combined which is not what I want.&lt;BR /&gt;&lt;BR /&gt;Did you run my code? I expect the output to look the same as freqtable but with Out of country being the fist row instead of in the middle. The calculated values I get are already correct so I don't know how else to show you it's already there.&lt;BR /&gt;&lt;BR /&gt;I can post a log later of trying to remove vvaluex later but I don't think it's as simple as that as I'm not trying to simply copy a single variable in that step.</description>
      <pubDate>Thu, 19 Nov 2020 11:37:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/700166#M214261</guid>
      <dc:creator>ms400000</dc:creator>
      <dc:date>2020-11-19T11:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help with freq summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/700169#M214263</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/355545"&gt;@ms400000&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Sounds good but simply removing vvaluex gives me an error&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;When I said VVALUEX is the problem, I meant in a logical sense. I meant that putting VVALUEX causes the problem, and that you can re-write the code such that it will work without VVALUEX.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you work with variables that have values -1 through 5, these will sort properly. Don't create character variables with VVALUEX and then try to force the character variables to sort as if they were numbers. Leave them as numbers until the very end.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 11:43:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/700169#M214263</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-11-19T11:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help with freq summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/700182#M214269</link>
      <description>Thanks, yeah I understand that that is where the character variable is being created. I suppose in temp I could create a new variable that takes the values of City_Q1 to City_Q4 based on which is not missing, it's just something that I will need to change when I reuse it.</description>
      <pubDate>Thu, 19 Nov 2020 12:28:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-freq-summary/m-p/700182#M214269</guid>
      <dc:creator>ms400000</dc:creator>
      <dc:date>2020-11-19T12:28:14Z</dc:date>
    </item>
  </channel>
</rss>

