<?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: Duplicate check across columns in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Duplicate-check-across-columns/m-p/363088#M85883</link>
    <description>&lt;P&gt;Sorry, you misunderstand, I was after some test data in the form of a datastep, not the logic. &amp;nbsp;You can follow this post:&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;</description>
    <pubDate>Wed, 31 May 2017 14:20:20 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-05-31T14:20:20Z</dc:date>
    <item>
      <title>Duplicate check across columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Duplicate-check-across-columns/m-p/363048#M85857</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am creating a framework which involves allocating scores to variables in columns. I have 6 variables that hold numeric data and I &amp;nbsp;&lt;/P&gt;&lt;P&gt;want to create a new flag with "Tie" or No "Tie" depending if any of the same numerics are featured in the list of variables and &lt;SPAN&gt;match the "highest score" column&lt;/SPAN&gt;. I want the highest score column only allocated to one variable. Please see the red areas highlighted below. From the data attached you can see that there are&amp;nbsp;variables tied with the numeric "5" which match the highest score column.Where there is a tie I want to use the variables in Green with the highest score in order to reassign the variable at the end of the process. This example should be reallocated from ACT_total_score to&amp;nbsp;DR_total_score,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you happen to know the best way to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Chris&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 13:00:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Duplicate-check-across-columns/m-p/363048#M85857</guid>
      <dc:creator>cmoore</dc:creator>
      <dc:date>2017-05-31T13:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate check across columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Duplicate-check-across-columns/m-p/363052#M85860</link>
      <description>&lt;P&gt;POst test data in the form of a datastep in your post. &amp;nbsp;Office files are dangerous and do not show structure. &amp;nbsp;Also, please show required output. &amp;nbsp;A simple datastep should be able to cover most of your requirements.&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 13:08:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Duplicate-check-across-columns/m-p/363052#M85860</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-05-31T13:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate check across columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Duplicate-check-across-columns/m-p/363056#M85862</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please see the data step below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data tie;&lt;/P&gt;&lt;P&gt;set test3;&lt;/P&gt;&lt;P&gt;if ACT_total_score &amp;gt;0 and ACT_total_score = largest and CORP_total_score &amp;gt;0 and CORP_total_score = largest then Allocation = "True"; else Allocation = "False";&lt;BR /&gt;if ACT_total_score &amp;gt;0 and ACT_total_score = largest and DR_total_score &amp;gt;0 and DR_total_score = largest then Allocation = "True"; else Allocation = "False";&lt;BR /&gt;if ACT_total_score &amp;gt;0 and ACT_total_score = largest and EPB_total_score &amp;gt;0 and EPB_total_score = largest then Allocation = "True"; else Allocation = "False";&lt;BR /&gt;if ACT_total_score &amp;gt;0 and ACT_total_score = largest and FIN_total_score &amp;gt;0 and FIN_total_score = largest then Allocation = "True"; else Allocation = "False";&lt;BR /&gt;if ACT_total_score &amp;gt;0 and ACT_total_score = largest and IP_IT_total_score &amp;gt;0 and IP_IT_total_score = largest then Allocation = "True"; else Allocation = "False";&lt;BR /&gt;if ACT_total_score &amp;gt;0 and ACT_total_score = largest and RE_total_score &amp;gt;0 and RE_total_score = largest then Allocation = "True"; else Allocation = "False";&lt;BR /&gt;if ACT_total_score &amp;gt;0 and ACT_total_score = largest and TAX_total_score &amp;gt;0 and TAX_total_score = largest then Allocation = "True"; else Allocation = "False";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, I just want to flag between 8 variables where the numerics in the data are the same and match it to a value stored in a column that identifies the highest value out of the 8 variables. The data step above feels long winded especially when I have to write all of the possible matched outcomes across the 8 variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 13:23:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Duplicate-check-across-columns/m-p/363056#M85862</guid>
      <dc:creator>cmoore</dc:creator>
      <dc:date>2017-05-31T13:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate check across columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Duplicate-check-across-columns/m-p/363060#M85865</link>
      <description>&lt;P&gt;1. Create an array for your list of variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Look at the MAX function to determine the highest value across an array&lt;/P&gt;
&lt;P&gt;3. Look at WHICHN () tells you if a value is in the series, ie is 25 in list of array values or is the max in the list?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 13:33:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Duplicate-check-across-columns/m-p/363060#M85865</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-05-31T13:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate check across columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Duplicate-check-across-columns/m-p/363076#M85874</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for sending the information through. How does the Which function deal with ties where the same numeric is within the array? I would want the column to be populated with a character to identify duplicates within the array.&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 13:55:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Duplicate-check-across-columns/m-p/363076#M85874</guid>
      <dc:creator>cmoore</dc:creator>
      <dc:date>2017-05-31T13:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate check across columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Duplicate-check-across-columns/m-p/363088#M85883</link>
      <description>&lt;P&gt;Sorry, you misunderstand, I was after some test data in the form of a datastep, not the logic. &amp;nbsp;You can follow this post:&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;</description>
      <pubDate>Wed, 31 May 2017 14:20:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Duplicate-check-across-columns/m-p/363088#M85883</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-05-31T14:20:20Z</dc:date>
    </item>
  </channel>
</rss>

