<?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: How do I get the  frequency of a constant accross all variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-get-the-frequency-of-a-constant-accross-all-variables/m-p/286960#M58963</link>
    <description>&lt;P&gt;It sounds like&amp;nbsp; you are moving in the right direction.&amp;nbsp; Try using three variables in your BY statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;by store ssn application_no;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then condition on last.ssn.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;by ssn store application_no;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then condition on last.store.&lt;/P&gt;</description>
    <pubDate>Mon, 25 Jul 2016 17:56:15 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2016-07-25T17:56:15Z</dc:date>
    <item>
      <title>How do I get the  frequency of a constant accross all variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-get-the-frequency-of-a-constant-accross-all-variables/m-p/286910#M58945</link>
      <description>&lt;P&gt;i am trying to see how many customers (by SSN) have applied for credit accross multiple customers/stores.&amp;nbsp; Each store has a unique ID and each SSN is unique.&amp;nbsp; I am using Enterprise Guide 5.1 and feel I shold use a Proc Freq but I need to see which unique SSN matches to more than on unique store_ID.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible with a Proc Freq or some other statement?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2016 15:53:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-get-the-frequency-of-a-constant-accross-all-variables/m-p/286910#M58945</guid>
      <dc:creator>James_Littlejohn</dc:creator>
      <dc:date>2016-07-25T15:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the  frequency of a constant accross all variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-get-the-frequency-of-a-constant-accross-all-variables/m-p/286916#M58948</link>
      <description>Is all this information in one dataset? Or is the data in more than 1 dataset? How is the data structured? Do you have one row for every unique SSN or can you have multiple SSN rows? Does each person/SSN have one column for their store IDs or .... ? How/whether you use PROC FREQ will depend on the answer to how the data is structured. &lt;BR /&gt;&lt;BR /&gt;cynthia&lt;BR /&gt; &lt;BR /&gt;cynthia</description>
      <pubDate>Mon, 25 Jul 2016 16:11:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-get-the-frequency-of-a-constant-accross-all-variables/m-p/286916#M58948</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-07-25T16:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the  frequency of a constant accross all variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-get-the-frequency-of-a-constant-accross-all-variables/m-p/286919#M58949</link>
      <description>&lt;P&gt;A single PROC FREQ won't do it, but two PROC FREQs will.&amp;nbsp; The idea is that the output from the first PROC FREQ becomes the input to the second PROC FREQ:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc freq data=have;&lt;/P&gt;
&lt;P&gt;tables ssn * store / noprint out=unique;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc freq data=unique;&lt;/P&gt;
&lt;P&gt;tables ssn / noprint out=want (keep=ssn count where=(count &amp;gt; 1));&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This gives you a final data set named WANT, with SSN and COUNT.&amp;nbsp; COUNT is a count of how many different stores that particular SSN applied at.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm sure there are some clever SQL programmers out there that could do this in one step. But with PROC FREQ it takes two.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2016 16:21:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-get-the-frequency-of-a-constant-accross-all-variables/m-p/286919#M58949</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-07-25T16:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the  frequency of a constant accross all variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-get-the-frequency-of-a-constant-accross-all-variables/m-p/286921#M58951</link>
      <description>&lt;P&gt;All of the data is in one dataset.&amp;nbsp; There is a column for Store_ID and another for SSN.&amp;nbsp; There are many dupllicates for both of these variables and I am trying to find the ssn's that are common in more than one store.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a unique record for each credit application that a customer fills out.&amp;nbsp; I want to see how many stores they apply to.&amp;nbsp; I de-duped by SSN and took the last record but that only gave me the store they applied for on the last application.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2016 16:24:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-get-the-frequency-of-a-constant-accross-all-variables/m-p/286921#M58951</guid>
      <dc:creator>James_Littlejohn</dc:creator>
      <dc:date>2016-07-25T16:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the  frequency of a constant accross all variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-get-the-frequency-of-a-constant-accross-all-variables/m-p/286956#M58962</link>
      <description>&lt;P&gt;That worked perfectly, thank you.&amp;nbsp; I now need to isolate the last applications for each customer for each store.&amp;nbsp; I have de duped by last.app_id but that only gives me one record per customer.&amp;nbsp; If the customer applied at 4 stores, I&amp;nbsp;want to keep&amp;nbsp;the last application entered (these are numerical) for each customer by store.&amp;nbsp; If the customer went to 1 store, they would have 1 record, 4 stores 4 records etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to sort by store name ascending application numb er, then take the last ssn for each store but am not getting success..&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2016 17:43:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-get-the-frequency-of-a-constant-accross-all-variables/m-p/286956#M58962</guid>
      <dc:creator>James_Littlejohn</dc:creator>
      <dc:date>2016-07-25T17:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the  frequency of a constant accross all variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-get-the-frequency-of-a-constant-accross-all-variables/m-p/286960#M58963</link>
      <description>&lt;P&gt;It sounds like&amp;nbsp; you are moving in the right direction.&amp;nbsp; Try using three variables in your BY statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;by store ssn application_no;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then condition on last.ssn.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;by ssn store application_no;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then condition on last.store.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2016 17:56:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-get-the-frequency-of-a-constant-accross-all-variables/m-p/286960#M58963</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-07-25T17:56:15Z</dc:date>
    </item>
  </channel>
</rss>

