<?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: Group cell and count frequency in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Group-cell-and-count-frequency/m-p/350526#M273459</link>
    <description>&lt;P&gt;So if I just copy and paste the counts from your PDF I can make some sample data.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
  input Amount @;
  do system_decision='DEC','AST','REF' ;
    input count @;
    output;
  end;
cards;
10000  843 2987 3783 7613
200000   4    0   26   30
400000   3    0    4    7
100000  27   53  281  361
;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I just used a number in the middle of the range to have an actual AMOUNT instead of a range.&lt;/P&gt;
&lt;P&gt;You can then define a FORMAT to group your data for your.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format ;
  value amount 
  0-75000 = '0-75k'
  75000-150000 = '75k-150k'
  150000-300000 = '150k-300k'
  300000-500000 = '300k-500k'
  other = 'Unknown'
  ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then to get the cross tab just use PROC FREQ. &amp;nbsp;You can play with the options if you only want to see the counts and not the percentages. For your real data you will not need the WEIGHT statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=have ;
 tables Amount * System_decision ;
 format amount amount. ;
 weight count;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 17 Apr 2017 14:49:39 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2017-04-17T14:49:39Z</dc:date>
    <item>
      <title>Group cell and count frequency</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Group-cell-and-count-frequency/m-p/348649#M273450</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attaching this excel file here, I have done some analysis in the analysis sheet to countif the data under certain groups,is it possible&lt;/P&gt;&lt;P&gt;to achieve that with SAS EG, please advise.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 10:58:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Group-cell-and-count-frequency/m-p/348649#M273450</guid>
      <dc:creator>bondtk</dc:creator>
      <dc:date>2017-04-10T10:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Group cell and count frequency</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Group-cell-and-count-frequency/m-p/348653#M273451</link>
      <description>&lt;P&gt;Well, firstly, you haven't attached any file.&lt;/P&gt;
&lt;P&gt;Secondly, it wouldn't matter anyways as most people wont download files from the internet.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thirdly, follow the guidance for posting questions - Post example test data in the form of a datastep following this post if you need help:&lt;/P&gt;
&lt;P&gt;&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;&lt;/P&gt;
&lt;P&gt;Finally, on your question, yes its perfectly possible to count data if it fits criteria. &amp;nbsp;Without knowing the data its hard to give any specific help other then filtering datasets using where clauses and proc freq/means would jump to mind. &amp;nbsp;I.e.&lt;/P&gt;
&lt;P&gt;proc means data=have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; where abc="condition";&lt;/P&gt;
&lt;P&gt;&amp;nbsp; output out=want n=n;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 11:06:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Group-cell-and-count-frequency/m-p/348653#M273451</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-04-10T11:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Group cell and count frequency</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Group-cell-and-count-frequency/m-p/348676#M273452</link>
      <description>&lt;P&gt;First you need to make a SAS dataset out of your Excel spreadsheet. Once that has happened, use the macro suggested by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9&lt;/a&gt; to convert your dataset into a data astep that can be posted here for reference.&lt;/P&gt;
&lt;P&gt;If you have trouble importing the Excel data, we need to solve that first. Post the log from the import step, using the {i} button found on top of the posting window.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With your example data (data step, see above), supply an expected result.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 13:15:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Group-cell-and-count-frequency/m-p/348676#M273452</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-04-10T13:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Group cell and count frequency</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Group-cell-and-count-frequency/m-p/349954#M273453</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have got the dataset from excel file, not sure about the macro as I am very new to SAS , so I am not familiar with SAS macros.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what I am trying to achieve from this set is to get the count based on Amount_Financed falls in to categories from&lt;/P&gt;&lt;P&gt;0-75k, 75-150k, 150-300k, 300-500k.&lt;/P&gt;&lt;P&gt;Also how many falls between System Decision :&amp;nbsp; AST, DEC and REF and how many are the consumer loans and how many are&lt;/P&gt;&lt;P&gt;non conusmer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have achieved that with excel formulas and pivot table , but need to achieve the same result with SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to use this SAS code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;data tk.feb_pivot;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;set tk.volume_af_data_feb_pivot;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;if Amount_Financed &amp;lt;=75000 then Lend_Level =&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;'Under75k'; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;else if 75000 GT Amount_Financed LE 150000 then Lend_Level =&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;'75-150k';&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;else if 150000 GT Amount_Financed LE 300000 then Lend_Level =&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;'150-300k'; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;else&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Lend_Level =&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;'300k-500k'; run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;proc freq data=tk.feb_pivot;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;tables Lend_Level/missing&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;nocum ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;run;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 04:02:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Group-cell-and-count-frequency/m-p/349954#M273453</guid>
      <dc:creator>bondtk</dc:creator>
      <dc:date>2017-04-14T04:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Group cell and count frequency</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Group-cell-and-count-frequency/m-p/349955#M273454</link>
      <description>&lt;P&gt;Attaching the pdf shot of excecl file&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 04:07:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Group-cell-and-count-frequency/m-p/349955#M273454</guid>
      <dc:creator>bondtk</dc:creator>
      <dc:date>2017-04-14T04:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Group cell and count frequency</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Group-cell-and-count-frequency/m-p/349973#M273455</link>
      <description>&lt;P&gt;DO NOT post a .sas7bdat. Instead use the macro from&amp;nbsp;&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; to convert your dataset to a data step, and post that here (use the "little running man" icon to preserve formatting). .sas7bdat files are often version/location/installation specific and may be unusable for others. A data step is just text.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 07:49:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Group-cell-and-count-frequency/m-p/349973#M273455</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-04-14T07:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Group cell and count frequency</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Group-cell-and-count-frequency/m-p/349984#M273456</link>
      <description>&lt;P&gt;Could yoiu please advise how to run this data step marco&lt;/P&gt;&lt;P&gt;I downloaded the file , extract the data and put it myfolders as datatodatstep.sas file&lt;/P&gt;&lt;P&gt;as I edit the autoexec&lt;/P&gt;&lt;P&gt;as per step 4 and run the code&lt;/P&gt;&lt;P&gt;&lt;SPAN class="token macrostatement"&gt;%include&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'/folders/myfolders/data2datastep.sas'&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;lrecl&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1000&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="token punctuation"&gt;it gives an error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="token punctuation"&gt;&lt;SPAN class="token macrostatement"&gt;%include&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'/folders/myfolders/data2datastep.sas'&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;lrecl&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1000&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/P&gt;&lt;DIV class="sasSource"&gt;61&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;62&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;63 %include '/myfolders/data2datastep.sas' /lrecl=1000;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: The path /myfolders/data2datastep.sas is not in the list of accessible paths when SAS is in the lockdown state.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: The %INCLUDE statement will not be executed due to a LOCKDOWN violation.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;64&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;65 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;78&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;please advise what is this error,&amp;nbsp; no idea about this.&lt;/DIV&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13709iB8814EE8DBC08F92/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="error sas .JPG" title="error sas .JPG" /&gt;</description>
      <pubDate>Fri, 14 Apr 2017 09:22:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Group-cell-and-count-frequency/m-p/349984#M273456</guid>
      <dc:creator>bondtk</dc:creator>
      <dc:date>2017-04-14T09:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Group cell and count frequency</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Group-cell-and-count-frequency/m-p/350003#M273457</link>
      <description>&lt;P&gt;&lt;SPAN&gt;RUN THIS CODE AS PER INSTRUCTIONS TO SET UP DATA2DATESTEP:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;%data2datastep(&lt;/SPAN&gt;&lt;SPAN&gt;cars,sashelp,,5)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;NO ERROR , BUT NO RESULTS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;NOTES 9:&amp;nbsp; &lt;/SPAN&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;NOTE: The quoted string currently being processed has become more than 262 bytes long.&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;You might have unbalanced quotation marks.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;FONT color="#000000"&gt;NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#000000"&gt;Inserting white space &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;&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; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#000000"&gt;between a quoted string and the succeeding identifier is recommended.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;THIS is so frustrating to send this data to this forum....&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 10:42:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Group-cell-and-count-frequency/m-p/350003#M273457</guid>
      <dc:creator>bondtk</dc:creator>
      <dc:date>2017-04-14T10:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Group cell and count frequency</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Group-cell-and-count-frequency/m-p/350516#M273458</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All we ask is that you take a minute or two to create some example test data in the form of a datastep. &amp;nbsp;Most companies will not all users to download random files from the internet, hence that is not a viable option. &amp;nbsp;We ask for the test data in the form of a datastep so that we can see &lt;STRONG&gt;both&lt;/STRONG&gt; structure and content - this is important when handling dates/times, formatted values etc. &amp;nbsp;It is very simple, say I need to show data with variablea as date and variableb as numeric, with id as char:&lt;/P&gt;
&lt;PRE&gt;data have;
  informat variablea date9.;
  input id $ variablea variableb;
datalines;
ABC 01JAN2014 12
DEF 04FEB2014 36
;
run;&lt;/PRE&gt;
&lt;P&gt;You will notice that the code appears in a grey box, this is above the post area, either the {i} or the SAS run symbol to add a code block. &amp;nbsp;Remember, we cannot see what you are working on, for us to help we need to be able to see it.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 14:24:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Group-cell-and-count-frequency/m-p/350516#M273458</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-04-17T14:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Group cell and count frequency</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Group-cell-and-count-frequency/m-p/350526#M273459</link>
      <description>&lt;P&gt;So if I just copy and paste the counts from your PDF I can make some sample data.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
  input Amount @;
  do system_decision='DEC','AST','REF' ;
    input count @;
    output;
  end;
cards;
10000  843 2987 3783 7613
200000   4    0   26   30
400000   3    0    4    7
100000  27   53  281  361
;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I just used a number in the middle of the range to have an actual AMOUNT instead of a range.&lt;/P&gt;
&lt;P&gt;You can then define a FORMAT to group your data for your.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format ;
  value amount 
  0-75000 = '0-75k'
  75000-150000 = '75k-150k'
  150000-300000 = '150k-300k'
  300000-500000 = '300k-500k'
  other = 'Unknown'
  ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then to get the cross tab just use PROC FREQ. &amp;nbsp;You can play with the options if you only want to see the counts and not the percentages. For your real data you will not need the WEIGHT statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=have ;
 tables Amount * System_decision ;
 format amount amount. ;
 weight count;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Apr 2017 14:49:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Group-cell-and-count-frequency/m-p/350526#M273459</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-04-17T14:49:39Z</dc:date>
    </item>
  </channel>
</rss>

