<?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 Need recommendations for best solution to create report with multiple statistics in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-recommendations-for-best-solution-to-create-report-with/m-p/103504#M9793</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a request to create a report that is basically a statistical report.&amp;nbsp; The report is to show counts of 'how many' observations there are for particular columns based on the value of the column. For example: data column 'TType',&amp;nbsp; this column can have up to 5 different distinct values, values (1,2,3,4, &amp;amp;5).&amp;nbsp; I need to get a count for how many observations there are in the table for each value.&amp;nbsp; I have done this by using a proc freq.&amp;nbsp; I also have to do counts on 20 other columns based on some criteria, for example, count the number of observations where a particular column is not null.&amp;nbsp; I am not sure the direction to go with for this.&amp;nbsp; I thought there would be a better way to code this than having 20 separate 'select count' statments.&amp;nbsp; I also need to all the counts to a data set.&amp;nbsp; This report has requests for the averages on some columns as well as counts for some columns.&amp;nbsp; Would appreciate any suggestions!&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Oct 2013 12:52:13 GMT</pubDate>
    <dc:creator>ncsthbell</dc:creator>
    <dc:date>2013-10-04T12:52:13Z</dc:date>
    <item>
      <title>Need recommendations for best solution to create report with multiple statistics</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-recommendations-for-best-solution-to-create-report-with/m-p/103504#M9793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a request to create a report that is basically a statistical report.&amp;nbsp; The report is to show counts of 'how many' observations there are for particular columns based on the value of the column. For example: data column 'TType',&amp;nbsp; this column can have up to 5 different distinct values, values (1,2,3,4, &amp;amp;5).&amp;nbsp; I need to get a count for how many observations there are in the table for each value.&amp;nbsp; I have done this by using a proc freq.&amp;nbsp; I also have to do counts on 20 other columns based on some criteria, for example, count the number of observations where a particular column is not null.&amp;nbsp; I am not sure the direction to go with for this.&amp;nbsp; I thought there would be a better way to code this than having 20 separate 'select count' statments.&amp;nbsp; I also need to all the counts to a data set.&amp;nbsp; This report has requests for the averages on some columns as well as counts for some columns.&amp;nbsp; Would appreciate any suggestions!&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 12:52:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-recommendations-for-best-solution-to-create-report-with/m-p/103504#M9793</guid>
      <dc:creator>ncsthbell</dc:creator>
      <dc:date>2013-10-04T12:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need recommendations for best solution to create report with multiple statistics</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-recommendations-for-best-solution-to-create-report-with/m-p/103505#M9794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For basic statistics and grouping, you should look into proc tabulate and/or proc report. Proc report syntax is slightly more complicated but it allows you to do some additionnal computations as opposed to proc tabulate where you are really stuck with the statistics provided by the procedure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are many other ways depending on how much you wish to manipulate the data (calculate the statistics) yourself and simply use a proc print with some ODS STYLE-ing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without a far more detailed data structure and desired output layout it is difficult to tell you which way is the best. With that said, the above 2 are designed to create tables with grouping (or class) variables like TTYPE. Tabulate does provide all the basic statistics that proc freq provides (default options). The condition on what is considered a missing value for the count is what might make it not workout.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 13:14:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-recommendations-for-best-solution-to-create-report-with/m-p/103505#M9794</guid>
      <dc:creator>Vince28_Statcan</dc:creator>
      <dc:date>2013-10-04T13:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Need recommendations for best solution to create report with multiple statistics</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-recommendations-for-best-solution-to-create-report-with/m-p/103506#M9795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Here are some examples of using PROC TABULATE to get both counts and statistics. Each TABLE statement produces 1 table. The 4th table uses a numeric variable in order to request MEAN statistic for MPG_CITY and MPG_HIGHWAY for each MAKE and TYPE, just to show a cross-tabulate. SASHELP.CARS has a LOT of car brands in the file, so I limited the MAKE variable to only 5 values to loosely correspond to your description.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods listing close;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;title; footnote;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods html file='c:\temp\car_info.html';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;proc tabulate data=sashelp.cars;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; where make in ('Acura', 'Audi', 'Toyota', 'Volkswagen', 'Saturn');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; class make type ;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; var mpg_city mpg_highway msrp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; table make all,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; n / box='1 Make in Rows';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; table make='2 Make as Columns' all ;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; table type all,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; make*n all*n/ box='3 Cross-Tab';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; table type all,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; make*(n='Count' mpg_city*mean mpg_highway*mean) / box='4 Average MPG';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods html close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 16:07:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-recommendations-for-best-solution-to-create-report-with/m-p/103506#M9795</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2013-10-04T16:07:29Z</dc:date>
    </item>
  </channel>
</rss>

