<?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 Summary Report shows different observations in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Summary-Report-shows-different-observations/m-p/400195#M3566</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to SAS, i imported the excel file by using the Import wizard.&lt;/P&gt;&lt;P&gt;File has 8011 obsevations. I am using SAS studio and SAS EG as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did the data segmentation uisng to capture data in different ranges.&lt;/P&gt;&lt;P&gt;Run Proc freq , which still shows 8011 observations.&lt;/P&gt;&lt;P&gt;Then run the proc summary to make this file as output so that I can export this file as excel file to run some pivot tables/chart.&lt;/P&gt;&lt;P&gt;Proc summary shows i have 5297 observations instead of 8011.&amp;nbsp; Not sure why? if someone can shed some light on it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data orion.aaamonthlydata;&lt;BR /&gt;length lend_level $10;&lt;BR /&gt;set orion.rawdatamonthly;&lt;/P&gt;&lt;P&gt;if amount_financed LE 75000 then Lend_Level ='Under75k';&lt;BR /&gt;else if (Amount_financed &amp;gt; 75000) and (Amount_financed&amp;lt;= 150000) then Lend_Level ='75-150k';&lt;BR /&gt;else if Amount_financed &amp;gt; 150000 and (Amount_financed&amp;lt;= 300000) then Lend_Level ='150k-300k';&lt;BR /&gt;else Lend_Level ='300k-500k';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc freq data=orion.aaamonthlydata order=freq;&lt;BR /&gt;tables lend_level*system_decision / norow nocol nopercent nocum;&lt;BR /&gt;title1 ' Volume Distribution ';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Result: 8011 total observations in the table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc summary data=orion.aaamonthlydata nway missing;&lt;BR /&gt;class Amount_Financed System_decision lend_level;&lt;BR /&gt;output out=orion.volumedist;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Only shows 5291 observations.&lt;/P&gt;&lt;P&gt;Need to know why proc freq shows 8011 observationa and proc summary shows 5297 observations. please advise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Oct 2017 07:49:50 GMT</pubDate>
    <dc:creator>bondtk</dc:creator>
    <dc:date>2017-10-02T07:49:50Z</dc:date>
    <item>
      <title>Summary Report shows different observations</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Summary-Report-shows-different-observations/m-p/400195#M3566</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to SAS, i imported the excel file by using the Import wizard.&lt;/P&gt;&lt;P&gt;File has 8011 obsevations. I am using SAS studio and SAS EG as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did the data segmentation uisng to capture data in different ranges.&lt;/P&gt;&lt;P&gt;Run Proc freq , which still shows 8011 observations.&lt;/P&gt;&lt;P&gt;Then run the proc summary to make this file as output so that I can export this file as excel file to run some pivot tables/chart.&lt;/P&gt;&lt;P&gt;Proc summary shows i have 5297 observations instead of 8011.&amp;nbsp; Not sure why? if someone can shed some light on it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data orion.aaamonthlydata;&lt;BR /&gt;length lend_level $10;&lt;BR /&gt;set orion.rawdatamonthly;&lt;/P&gt;&lt;P&gt;if amount_financed LE 75000 then Lend_Level ='Under75k';&lt;BR /&gt;else if (Amount_financed &amp;gt; 75000) and (Amount_financed&amp;lt;= 150000) then Lend_Level ='75-150k';&lt;BR /&gt;else if Amount_financed &amp;gt; 150000 and (Amount_financed&amp;lt;= 300000) then Lend_Level ='150k-300k';&lt;BR /&gt;else Lend_Level ='300k-500k';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc freq data=orion.aaamonthlydata order=freq;&lt;BR /&gt;tables lend_level*system_decision / norow nocol nopercent nocum;&lt;BR /&gt;title1 ' Volume Distribution ';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Result: 8011 total observations in the table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc summary data=orion.aaamonthlydata nway missing;&lt;BR /&gt;class Amount_Financed System_decision lend_level;&lt;BR /&gt;output out=orion.volumedist;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Only shows 5291 observations.&lt;/P&gt;&lt;P&gt;Need to know why proc freq shows 8011 observationa and proc summary shows 5297 observations. please advise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 07:49:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Summary-Report-shows-different-observations/m-p/400195#M3566</guid>
      <dc:creator>bondtk</dc:creator>
      <dc:date>2017-10-02T07:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Report shows different observations</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Summary-Report-shows-different-observations/m-p/400202#M3567</link>
      <description>&lt;P&gt;Its quite hard to say without seeing data, but from your freq:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;tables lend_level*system_decision / norow nocol nopercent nocum;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;versus your summary:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;class Amount_Financed System_decision lend_level;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We can see that there is another variable present - amount_financed which is not included in the freq.&amp;nbsp; Could it be that this is grouping the data in smaller groups, hence you end up with fewer results?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 09:01:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Summary-Report-shows-different-observations/m-p/400202#M3567</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-10-02T09:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Report shows different observations</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Summary-Report-shows-different-observations/m-p/400285#M3569</link>
      <description>&lt;P&gt;Your Proc Summary output shown is incomplete. Note that the output says 5 columns but you only show 3.&lt;/P&gt;
&lt;P&gt;Yout output data set would contain two other variables if the code you show is what you ran. One variable would be _type_ to indicate the combination of class variables and the other would be _freq_ indicating how many records have that combination of the class variables.&lt;/P&gt;
&lt;P&gt;So I suspect that _freq_ has occasional values of 2 or 3 or even more and the TOTAL of _freq_ will match the number of records from proc freq.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 14:49:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Summary-Report-shows-different-observations/m-p/400285#M3569</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-10-02T14:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Report shows different observations</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Summary-Report-shows-different-observations/m-p/402165#M3625</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are right, I though proc summary will show the same number of observations, but it grouped the entries and hence shows less observations, when I export the file in excel and run pivot table it shows the same 8011 as total , so the problem is solved.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Oct 2017 07:55:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Summary-Report-shows-different-observations/m-p/402165#M3625</guid>
      <dc:creator>bondtk</dc:creator>
      <dc:date>2017-10-08T07:55:28Z</dc:date>
    </item>
  </channel>
</rss>

