<?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 flag miss match values in multiple variables based on other variable in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-flag-miss-match-values-in-multiple-variables-based-on/m-p/704692#M19689</link>
    <description>I need to do these on multiple visits Kurt, will there be any issues</description>
    <pubDate>Wed, 09 Dec 2020 12:37:57 GMT</pubDate>
    <dc:creator>Ravindra_</dc:creator>
    <dc:date>2020-12-09T12:37:57Z</dc:date>
    <item>
      <title>How to flag miss match values in multiple variables based on other variable</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-flag-miss-match-values-in-multiple-variables-based-on/m-p/704681#M19684</link>
      <description>&lt;P&gt;I have got below requirement&lt;/P&gt;&lt;P&gt;For the Same FormSeq&lt;BR /&gt;If T1TIMP = NOT NULL&lt;BR /&gt;THEN&lt;BR /&gt;the timepoint entered on T1TIMP should match with the timepoint entered on T2TIMP and T3TIMP for the same FormSeq. If not, then output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i am trying to do is writing multiple if then else condition which is getting really tedious, is there any efficient way to do this in one or two steps.&lt;/P&gt;&lt;P&gt;example dataset below:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ndsn;
infile datalines;
input subjid $8. formseq  T1TIMP $11. T2TIMP $15. T3TIMP $11.;
datalines;
ABCD123 1 PRE-DOSE     1.5HRS-POST  3HRS-POST
ABCD123 1 1.5HRS-POST  1.5HRS-POST  1.5HRPOST
ABCD123 1 1.5HRS-POST  3HRS-POST    1HRPOST
ABCD145 2 3.5HRS-POST  2HRS-POST    6HRPOST
ABCD168 2 2HRS-POST    6HRS-POST    8HRPOST
ABCD167 3 1.5HRS-POST  12HRS-POST   1HRPOST
ABCD167 3 1.5HRS-POST  3HRS-POST    2HRPOST
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;any help please&lt;/P&gt;&lt;P&gt;The expected output should be as below, excluding the second row which is having all values matching for same formseq, sometimes they were not in one single row and i am trying to flag them if the values were not matching for the same formseq.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ABCD123 1 PRE-DOSE     1.5HRS-POST  3HRS-POST
ABCD123 1 1.5HRS-POST  3HRS-POST    1HRPOST
ABCD145 2 3.5HRS-POST  2HRS-POST    6HRPOST
ABCD168 2 2HRS-POST    6HRS-POST    8HRPOST
ABCD167 3 1.5HRS-POST  12HRS-POST   1HRPOST
ABCD167 3 1.5HRS-POST  3HRS-POST    2HRPOST&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Dec 2020 11:58:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-flag-miss-match-values-in-multiple-variables-based-on/m-p/704681#M19684</guid>
      <dc:creator>Ravindra_</dc:creator>
      <dc:date>2020-12-09T11:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to flag miss match values in multiple variables based on other variable</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-flag-miss-match-values-in-multiple-variables-based-on/m-p/704683#M19685</link>
      <description>&lt;P&gt;And what would be the expected output rom this example dataset? Please state for every result observation why it has to be included.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/260204"&gt;@Ravindra_&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have got below requirement&lt;/P&gt;
&lt;P&gt;For the Same FormSeq&lt;BR /&gt;If T1TIMP = NOT NULL&lt;BR /&gt;THEN&lt;BR /&gt;the timepoint entered on T1TIMP should match with the timepoint entered on T2TIMP and T3TIMP for the same FormSeq. If not, then output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What i am trying to do is writing multiple if then else condition which is getting really tedious, is there any efficient way to do this in one or two steps.&lt;/P&gt;
&lt;P&gt;example dataset below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ndsn;
infile datalines;
input subjid $8. formseq  T1TIMP $11. T2TIMP $15. T3TIMP $11.;
datalines;
ABCD123 1 PRE-DOSE     1.5HRS-POST  3HRS-POST
ABCD123 1 1.5HRS-POST  1.5HRS-POST  1.5HRPOST
ABCD123 1 1.5HRS-POST  3HRS-POST    1HRPOST
ABCD145 2 3.5HRS-POST  2HRS-POST    6HRPOST
ABCD168 2 2HRS-POST    6HRS-POST    8HRPOST
ABCD167 3 1.5HRS-POST  12HRS-POST   1HRPOST
ABCD167 3 1.5HRS-POST  3HRS-POST    2HRPOST
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;any help please&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 11:39:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-flag-miss-match-values-in-multiple-variables-based-on/m-p/704683#M19685</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-12-09T11:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to flag miss match values in multiple variables based on other variable</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-flag-miss-match-values-in-multiple-variables-based-on/m-p/704687#M19686</link>
      <description>I had edited my post Kurt</description>
      <pubDate>Wed, 09 Dec 2020 11:58:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-flag-miss-match-values-in-multiple-variables-based-on/m-p/704687#M19686</guid>
      <dc:creator>Ravindra_</dc:creator>
      <dc:date>2020-12-09T11:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to flag miss match values in multiple variables based on other variable</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-flag-miss-match-values-in-multiple-variables-based-on/m-p/704688#M19687</link>
      <description>&lt;P&gt;See this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ndsn;
infile datalines;
input subjid $8. formseq  T1TIMP $11. T2TIMP $15. T3TIMP $11.;
datalines;
ABCD123 1 PRE-DOSE     1.5HRS-POST  3HRS-POST
ABCD123 1 1.5HRS-POST  1.5HRS-POST  1.5HRS-POST
ABCD123 1 1.5HRS-POST  3HRS-POST    1HRPOST
ABCD145 2 3.5HRS-POST  2HRS-POST    6HRPOST
ABCD168 2 2HRS-POST    6HRS-POST    8HRPOST
ABCD167 3 1.5HRS-POST  12HRS-POST   1HRPOST
ABCD167 3 1.5HRS-POST  3HRS-POST    2HRPOST
;

data want;
set ndsn;
if not (T1TIMP = T2TIMP and T2TIMP = T3TIMP);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that I had to edit the second observation of the source data.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 12:14:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-flag-miss-match-values-in-multiple-variables-based-on/m-p/704688#M19687</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-12-09T12:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to flag miss match values in multiple variables based on other variable</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-flag-miss-match-values-in-multiple-variables-based-on/m-p/704690#M19688</link>
      <description>&lt;P&gt;By applying deMorgan's law, the code is a little simpler:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set ndsn;
if  T1TIMP ne T2TIMP or T1TIMP ne T3TIMP;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Dec 2020 12:20:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-flag-miss-match-values-in-multiple-variables-based-on/m-p/704690#M19688</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-12-09T12:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to flag miss match values in multiple variables based on other variable</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-flag-miss-match-values-in-multiple-variables-based-on/m-p/704692#M19689</link>
      <description>I need to do these on multiple visits Kurt, will there be any issues</description>
      <pubDate>Wed, 09 Dec 2020 12:37:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-flag-miss-match-values-in-multiple-variables-based-on/m-p/704692#M19689</guid>
      <dc:creator>Ravindra_</dc:creator>
      <dc:date>2020-12-09T12:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to flag miss match values in multiple variables based on other variable</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-flag-miss-match-values-in-multiple-variables-based-on/m-p/704703#M19690</link>
      <description>&lt;P&gt;Might it not be better overall to transpose to a long format and sort with nodupkey? That would eliminate ALL duplicate values.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 13:27:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-flag-miss-match-values-in-multiple-variables-based-on/m-p/704703#M19690</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-12-09T13:27:00Z</dc:date>
    </item>
  </channel>
</rss>

