<?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: Proc Tabulate - Using a character variable in the VAR Statement in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295954#M16770</link>
    <description>&lt;P&gt;Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I usually turn Excel files into CSV and import according to rules about what data types and expected values in the data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you already have a SAS data set then this link: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show you how to create datastep text that can be posted here, either paste into the window or attach as a TXT file that we can then run and recreate your data. You only need to include enough data to recreate significant issues. Generally at least two values of any category and if missing values need special treatment then some of those.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Sep 2016 17:50:25 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-09-01T17:50:25Z</dc:date>
    <item>
      <title>Proc Tabulate - Using a character variable in the VAR Statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295829#M16751</link>
      <description>&lt;P&gt;good morning, I am trying to create a cross tab table using proc tabulate, but am having a difficult time because one of my variables is a character. I am relatively new to using SAS and am unsure if there is a way to format the variable or transform the variable so it will fit in the body of my table. The data I am using looks somewhat like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; try;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;input&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; Market $ Number Type $;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;datalines&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Eastern 17 Low&lt;/P&gt;&lt;P&gt;South 25 Mid&lt;/P&gt;&lt;P&gt;Midwest 92 High&lt;/P&gt;&lt;P&gt;West 33 Mid&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&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;Market would be my class variable in proc tabulate and then I would like two columns, one with the number and one with the type. My tabulate statement looks like this:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&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;tabulate&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;=try;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;class&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; Market;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;var&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; Number;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;var&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; Type;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;table&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; Market, Number=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'Count'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; Type;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&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;but when I run it, I get the inevitable error:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;105&lt;/P&gt;&lt;P&gt;106 proc tabulate data=try;&lt;/P&gt;&lt;P&gt;107 class Market;&lt;/P&gt;&lt;P&gt;108 var Number;&lt;/P&gt;&lt;P&gt;109 var Type;&lt;/P&gt;&lt;P&gt;ERROR: Variable Type in list does not match type prescribed for this list.&lt;/P&gt;&lt;P&gt;110 table Market, Number='Count' Type;&lt;/P&gt;&lt;P&gt;111 run;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE TABULATE used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.00 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is there a way to get around this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you for any assistance you can give.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 13:40:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295829#M16751</guid>
      <dc:creator>sam2</dc:creator>
      <dc:date>2016-09-01T13:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate - Using a character variable in the VAR Statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295832#M16752</link>
      <description>&lt;P&gt;You need 'Type' in the class statement as well since it is a character variable.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 13:52:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295832#M16752</guid>
      <dc:creator>howarder</dc:creator>
      <dc:date>2016-09-01T13:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate - Using a character variable in the VAR Statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295833#M16753</link>
      <description>&lt;P&gt;Also I believe that this code will help you get the result that you are trying to get..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=try;
class Market Type;
var Number;
table Market*type,Number='Count';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Sep 2016 13:56:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295833#M16753</guid>
      <dc:creator>howarder</dc:creator>
      <dc:date>2016-09-01T13:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate - Using a character variable in the VAR Statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295841#M16755</link>
      <description>&lt;P&gt;thank you for the assistance Howarder,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run it the way you suggest I get a cross tab table that looks like this;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Market&amp;nbsp;&amp;nbsp;&amp;nbsp; Type&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eastern&amp;nbsp;&amp;nbsp; Low&amp;nbsp;&amp;nbsp; 17&lt;/P&gt;&lt;P&gt;Midwest&amp;nbsp;&amp;nbsp; High&amp;nbsp; 92&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is there a way to get the Type character variable to be placed in the body of the cross tab?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Market&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type&lt;/P&gt;&lt;P&gt;Eastern&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Low&lt;/P&gt;&lt;P&gt;Midwest&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 92&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; High&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you again for all your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;take care,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sam&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 14:12:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295841#M16755</guid>
      <dc:creator>sam2</dc:creator>
      <dc:date>2016-09-01T14:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate - Using a character variable in the VAR Statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295851#M16756</link>
      <description>&lt;P&gt;Here's a different structure that looks more like a cross-tab ... worth playing with if you like the idea:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&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;tabulate&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;=try;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;class&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; Market Type;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;var&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; Number;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;table&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; Market, Type=' ' * Number=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;' ' * sum=' '&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 14:25:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295851#M16756</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-09-01T14:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate - Using a character variable in the VAR Statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295857#M16757</link>
      <description>&lt;P&gt;Thank you Astounding, I played with this a little and it still slightly misses what I am trying to get to.&amp;nbsp; I need for my table to have the market area as the row header and then in the body of the report, I get a Column specifically with the Count number in it and another column with the description of the market in it or Type. Is it possible to place character variables in a column instead of a numeric variable?&amp;nbsp; So the way I am looking for this to set up is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Market&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type&lt;/P&gt;&lt;P&gt;Eastern&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Low&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As always, I appreciate all the assistance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sam&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 14:36:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295857#M16757</guid>
      <dc:creator>sam2</dc:creator>
      <dc:date>2016-09-01T14:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate - Using a character variable in the VAR Statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295860#M16758</link>
      <description>&lt;P&gt;How is this any different than using PROC PRINT?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is possible that PROC TABULATE is not the right tool for the job.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 14:46:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295860#M16758</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-09-01T14:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate - Using a character variable in the VAR Statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295868#M16760</link>
      <description>&lt;P&gt;Oh it is very possible that proc tabulate isn't what I should be using.&amp;nbsp; I am simplifying the data, so a lot of other things are going on within the proc tabulate piece, but the sticking point I am having is putting the character variable into the body of the chart. Ultimately, the chart has 14 columns, there are calculations occurring, several subcategories, I feel like it would best be done with proc tabulate or proc report, but with either of them I can't seem to add the Character variables to the body.&amp;nbsp; Is there a way that you would know to get around this, or is there a better process to use given your limited knowledge of my data set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sam&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 14:59:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295868#M16760</guid>
      <dc:creator>sam2</dc:creator>
      <dc:date>2016-09-01T14:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate - Using a character variable in the VAR Statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295876#M16763</link>
      <description>&lt;P&gt;Based on everything you have mentioned, taken as a whole, I think the approach should be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Perform all the calculations (without generating a report), and save the results in a data set.&lt;/LI&gt;
&lt;LI&gt;Use PROC PRINT on the calculated data set.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;If I knew more details I might think about it differently, but there is no easy way for PROC TABULATE to print a character field as a column in the middle of the report.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 15:10:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295876#M16763</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-09-01T15:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate - Using a character variable in the VAR Statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295881#M16764</link>
      <description>&lt;P&gt;If you want the columns in a certian order, you may want to look into Proc Report to create your desired output.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 15:23:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295881#M16764</guid>
      <dc:creator>howarder</dc:creator>
      <dc:date>2016-09-01T15:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate - Using a character variable in the VAR Statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295890#M16766</link>
      <description>&lt;P&gt;The only way to get text in the order you are indicating is to have the type value represented by a numeric value that can appear on the Var statement AND use a custom format with an appropriate statistic. If your "Type" is dependent on the Count variable this might be the best approach.&lt;/P&gt;
&lt;P&gt;Please examine:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc format library=work;
invalue type
   'Low'  = 1
   'Mid'  = 2
   'High' = 3
;
value type
   1 = 'Low'
   2 = 'Mid'
   3 = 'High'
;
run;
data try;
   informat type type.;
   format   type type.;
input Market $ Number Type ;
datalines;
Eastern 17 Low
South 25 Mid
Midwest 92 High
West 33 Mid
;
run;
proc tabulate data=try;
   class Market;
   var Number;
   var Type;
table Market, Number='Count'*sum='' Type*max=''*f=type.;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I read the data with a custom format, you could add a new variable such a TypeNum using&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Typenum = input(Type,Type.);&lt;/P&gt;
&lt;P&gt;and use that numeric variable with the format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Caution: This may not work if crossing type with other statistics and if your Type changes within Market the result isn't reliable.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 15:35:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295890#M16766</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-09-01T15:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate - Using a character variable in the VAR Statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295950#M16769</link>
      <description>&lt;P&gt;Thank you Ballardw, this is doing what I want it to do.&amp;nbsp; I apologize, but I am not strong on what you have done.&amp;nbsp; In my original dataset, I am reading in the data before I start proc tabulate, so the data is already read in, can you show me how I would do this if you read in this file first?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for all the assistance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sam&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 17:25:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295950#M16769</guid>
      <dc:creator>sam2</dc:creator>
      <dc:date>2016-09-01T17:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate - Using a character variable in the VAR Statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295954#M16770</link>
      <description>&lt;P&gt;Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I usually turn Excel files into CSV and import according to rules about what data types and expected values in the data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you already have a SAS data set then this link: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show you how to create datastep text that can be posted here, either paste into the window or attach as a TXT file that we can then run and recreate your data. You only need to include enough data to recreate significant issues. Generally at least two values of any category and if missing values need special treatment then some of those.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 17:50:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295954#M16770</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-09-01T17:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate - Using a character variable in the VAR Statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295960#M16771</link>
      <description>&lt;P&gt;I apologize Ballardw, that is a mistake I will not make again.&amp;nbsp; I was giving you a file that you could read in, the data is the same as what the datastep did before, but I think you will see what I am trying to do from this.&amp;nbsp; If the data is already read, can you format a particular column from that data that is a character into a numeric and allow me to put it in a proc tabulate column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so, instead of formatting and then reading in the data, do it something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; try;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;input&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; Market $ Number Type $;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;datalines&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Eastern 17 Low&lt;/P&gt;&lt;P&gt;South 25 Mid&lt;/P&gt;&lt;P&gt;Midwest 92 High&lt;/P&gt;&lt;P&gt;West 33 Mid&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;Proc&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;format&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;library&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;=work;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;invalue&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; type&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'Low'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'Mid'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'High'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;3&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;value&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; type&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'Low'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'Mid'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;3&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'High'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; try2;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; try;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;informat&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; type &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;type.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;format&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; type &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;type.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;tabulate&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;=try;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;class&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; Market;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;var&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; Number;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;var&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; Type;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;table&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; Market=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;''&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;, Number=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'Count'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;*sum=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;''&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; Type*max=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;''&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;*&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;f&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;type.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="arial black,avant garde" size="2"&gt;this does not run for me when I try it like this, I know it is in what I am doing, but can you provide assistance?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="arial black,avant garde" size="2"&gt;thank you again and have a great day!&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="arial black,avant garde" size="2"&gt;sam&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 18:20:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/295960#M16771</guid>
      <dc:creator>sam2</dc:creator>
      <dc:date>2016-09-01T18:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate - Using a character variable in the VAR Statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/296012#M16777</link>
      <description>&lt;P&gt;Please post code using the ^^ Run icon above.&lt;/P&gt;
&lt;P&gt;You had several Issues: First in your TRY2 dataset you did not create a numeric value. You generated warnings because you attempted to use numeric format and informat with a variable Try that was character. Here is how to create a numeric variable from&lt;/P&gt;
&lt;P&gt;your existing type.&lt;/P&gt;
&lt;P&gt;Second your Proc Tabulate should reference the new dataset, Try2. You were still pointing it to the original Try. Then you need to use the numeric version of the variable. Make sure to reference it in the VAR and Table statements with the same name.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data try2;
   set try;
   format typeNum type.;
   TypeNum = input(type,type.);
run;
/* two things: First you would need your Try2 set
and use the numeric version*/
proc tabulate data=try2;
class Market;
var Number;

var TypeNum;
table Market='', Number='Count'*sum='' TypeNum*max=''*f=type.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Sep 2016 22:42:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/296012#M16777</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-09-01T22:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate - Using a character variable in the VAR Statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/296024#M16779</link>
      <description>Hi: Take a look at the example in this paper&lt;BR /&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings14/SAS388-2014.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings14/SAS388-2014.pdf&lt;/A&gt; &lt;BR /&gt;at the example on pages 5 and 6 of using PROC REPORT to get a character variable in a cell in a table.&lt;BR /&gt; &lt;BR /&gt;cynthia</description>
      <pubDate>Fri, 02 Sep 2016 00:51:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/296024#M16779</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-09-02T00:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate - Using a character variable in the VAR Statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/296755#M16804</link>
      <description>&lt;P&gt;thank you to everyone who helped solve this problem, I appreciate it more than you will know.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2016 14:43:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Tabulate-Using-a-character-variable-in-the-VAR-Statement/m-p/296755#M16804</guid>
      <dc:creator>sam2</dc:creator>
      <dc:date>2016-09-06T14:43:12Z</dc:date>
    </item>
  </channel>
</rss>

