<?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 to best work with 2 related tables with different formats, for conditional scoring in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-best-work-with-2-related-tables-with-different-formats/m-p/950704#M371746</link>
    <description>This worked, thanks!</description>
    <pubDate>Wed, 13 Nov 2024 20:58:48 GMT</pubDate>
    <dc:creator>Cal_Hottie</dc:creator>
    <dc:date>2024-11-13T20:58:48Z</dc:date>
    <item>
      <title>how to best work with 2 related tables with different formats, for conditional scoring</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-best-work-with-2-related-tables-with-different-formats/m-p/950659#M371742</link>
      <description>&lt;P&gt;I am working with 2 data sets&amp;nbsp; that need to coordinate. They are set up as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table 1. Date_Zip table with numerical value for each date zip combo:&lt;/P&gt;&lt;P&gt;Date _90001 _90002 ... _96162&lt;/P&gt;&lt;P&gt;01-01-2016 15.35 30.29 39.08&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;12-31-2020 30.55 62.75 55.14&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table 2. Risk and threshold by zip&lt;/P&gt;&lt;P&gt;Zip&amp;nbsp; Risk (numerical) Threshold (numerical)&lt;/P&gt;&lt;P&gt;90001 1.0 18.36&lt;/P&gt;&lt;P&gt;90001 1.5 20.16&lt;/P&gt;&lt;P&gt;90001 2.0 23.75&lt;/P&gt;&lt;P&gt;90001 2.5 25.11&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;96162 1.0 23.22&lt;/P&gt;&lt;P&gt;96162 1.5 25.45&lt;/P&gt;&lt;P&gt;96162 2.0 28.85&lt;/P&gt;&lt;P&gt;96162 2.5 30.44&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am trying to figure out the best way to work with these tables. The goal is to determine a score for each table 1 zip date value based on the table 2 zip specific risk and threshold values.&lt;/P&gt;&lt;P&gt;* the risk values will determine the nominal score (&amp;lt;1 risk = score 0, 1-1.5 risk = score 1, 1..5-2.0 risk = score 2, 2.0-2.5 risk = score 3, &amp;gt;2.5 risk = score 4).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My final table would have a unique score for each day for each zip.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 19:19:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-best-work-with-2-related-tables-with-different-formats/m-p/950659#M371742</guid>
      <dc:creator>Cal_Hottie</dc:creator>
      <dc:date>2024-11-13T19:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to best work with 2 related tables with different formats, for conditional scoring</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-best-work-with-2-related-tables-with-different-formats/m-p/950684#M371743</link>
      <description>&lt;P&gt;Convert your first dataset into something that more closely resembles your description.&amp;nbsp; A series of DATE/ZIP pairs.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=Date_Zip out=tall;
  by date ;
  var _: ;
run;
data tall;
  set tall;
  zip=input(substr(_name_,2),5.);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Now you can combine the data by ZIP value.&amp;nbsp; You might also want to rename the generated COL1 variable to something that is more meaningful to make the code clearer.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 19:50:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-best-work-with-2-related-tables-with-different-formats/m-p/950684#M371743</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-11-13T19:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to best work with 2 related tables with different formats, for conditional scoring</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-best-work-with-2-related-tables-with-different-formats/m-p/950704#M371746</link>
      <description>This worked, thanks!</description>
      <pubDate>Wed, 13 Nov 2024 20:58:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-best-work-with-2-related-tables-with-different-formats/m-p/950704#M371746</guid>
      <dc:creator>Cal_Hottie</dc:creator>
      <dc:date>2024-11-13T20:58:48Z</dc:date>
    </item>
  </channel>
</rss>

