<?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 De-Duping Relationship and Inverse Relationship Records in Alteryx Designer Desktop Discussions</title>
    <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/De-Duping-Relationship-and-Inverse-Relationship-Records/m-p/1187984#M294580</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a Relationship export that has two records representing each unique relationship (example: one record for Parent-Child and another for Child-Parent). I need to de-dupe this dataset so that each relationship only has 1 record. The RelationshipType and InverseRelationships are set up such that a given RelationshipType can have only 1 possible InverseRelationship, and vice versa. I've included an example of the dataset below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;LegacyContactId&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;LegacyRelatedContactId&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;RelationshipType&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;InverseRelationship&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;Child&lt;/TD&gt;&lt;TD&gt;Parent&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;Parent&lt;/TD&gt;&lt;TD&gt;Child&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;789&lt;/TD&gt;&lt;TD&gt;1011&lt;/TD&gt;&lt;TD&gt;Business&lt;/TD&gt;&lt;TD&gt;Owner&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1011&lt;/TD&gt;&lt;TD&gt;789&lt;/TD&gt;&lt;TD&gt;Owner&lt;/TD&gt;&lt;TD&gt;Business&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1213&lt;/TD&gt;&lt;TD&gt;1415&lt;/TD&gt;&lt;TD&gt;Sibling&lt;/TD&gt;&lt;TD&gt;Sibling&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1415&lt;/TD&gt;&lt;TD&gt;1213&lt;/TD&gt;&lt;TD&gt;Sibling&lt;/TD&gt;&lt;TD&gt;Sibling&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that for simplicity sake, I have put the relationship pair of records next to each other, but in the real dataset they may be far apart.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought that I could resolve this using a self-join with the Join tool, connecting Left: LegacyContact = Right: LegacyRelatedContactId and Left: LegacyRelatedContactId = Right: LegacyContactId, but that gives me the same number of records when I would have expected the count to decrease by half.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would y'all suggest that I approach this? Thank you!&lt;/P&gt;</description>
    <pubDate>Mon, 18 Sep 2023 23:06:38 GMT</pubDate>
    <dc:creator>kcroninkrein</dc:creator>
    <dc:date>2023-09-18T23:06:38Z</dc:date>
    <item>
      <title>De-Duping Relationship and Inverse Relationship Records</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/De-Duping-Relationship-and-Inverse-Relationship-Records/m-p/1187984#M294580</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a Relationship export that has two records representing each unique relationship (example: one record for Parent-Child and another for Child-Parent). I need to de-dupe this dataset so that each relationship only has 1 record. The RelationshipType and InverseRelationships are set up such that a given RelationshipType can have only 1 possible InverseRelationship, and vice versa. I've included an example of the dataset below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;LegacyContactId&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;LegacyRelatedContactId&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;RelationshipType&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;InverseRelationship&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;Child&lt;/TD&gt;&lt;TD&gt;Parent&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;Parent&lt;/TD&gt;&lt;TD&gt;Child&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;789&lt;/TD&gt;&lt;TD&gt;1011&lt;/TD&gt;&lt;TD&gt;Business&lt;/TD&gt;&lt;TD&gt;Owner&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1011&lt;/TD&gt;&lt;TD&gt;789&lt;/TD&gt;&lt;TD&gt;Owner&lt;/TD&gt;&lt;TD&gt;Business&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1213&lt;/TD&gt;&lt;TD&gt;1415&lt;/TD&gt;&lt;TD&gt;Sibling&lt;/TD&gt;&lt;TD&gt;Sibling&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1415&lt;/TD&gt;&lt;TD&gt;1213&lt;/TD&gt;&lt;TD&gt;Sibling&lt;/TD&gt;&lt;TD&gt;Sibling&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that for simplicity sake, I have put the relationship pair of records next to each other, but in the real dataset they may be far apart.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought that I could resolve this using a self-join with the Join tool, connecting Left: LegacyContact = Right: LegacyRelatedContactId and Left: LegacyRelatedContactId = Right: LegacyContactId, but that gives me the same number of records when I would have expected the count to decrease by half.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would y'all suggest that I approach this? Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 23:06:38 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/De-Duping-Relationship-and-Inverse-Relationship-Records/m-p/1187984#M294580</guid>
      <dc:creator>kcroninkrein</dc:creator>
      <dc:date>2023-09-18T23:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: De-Duping Relationship and Inverse Relationship Records</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/De-Duping-Relationship-and-Inverse-Relationship-Records/m-p/1188010#M294583</link>
      <description>&lt;P&gt;add 2 new columns, sort them by formula&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;formula&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;1:&amp;nbsp;if [LegacyContactId]&amp;lt;[LegacyRelatedContactId] then&amp;nbsp;[LegacyContactId] else [LegacyRelatedContactId] endif&lt;/P&gt;&lt;P&gt;2:&amp;nbsp;if [LegacyContactId]&amp;lt;[LegacyRelatedContactId] then&amp;nbsp;[LegacyRelatedContactId] else [LegacyContactId] endif&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-09-19 094609.png" style="width: 945px;"&gt;&lt;img src="https://community.alteryx.com/t5/image/serverpage/image-id/322959iC58FBF8C5AC900E1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-09-19 094609.png" alt="Screenshot 2023-09-19 094609.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;then add unique tool and keep unique by the new 2 column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 01:48:02 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/De-Duping-Relationship-and-Inverse-Relationship-Records/m-p/1188010#M294583</guid>
      <dc:creator>AncientPandaman</dc:creator>
      <dc:date>2023-09-19T01:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: De-Duping Relationship and Inverse Relationship Records</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/De-Duping-Relationship-and-Inverse-Relationship-Records/m-p/1188759#M294795</link>
      <description>&lt;P&gt;Thank you, Pang_Hee_Choy!&amp;nbsp; That seems to have worked. I added in a third column that added in a formula for&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;IF [RelationshipType] &amp;lt; [InverseRelationship] THEN [RelationshipType] ELSE [InverseRelationship] ENDIF&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This pulls in whichever relationship is alphabetically earlier than the other (which works because each Relationship has only one InverseRelationship option). That way it isn't removing instances where the two accounts might have a second valid relationship (example: Parent-Child and Team Leader-Team Member). That facet wasn't present in the example dataset, but is in the real data so wanted to mention it for others who might encounter a similar issue.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 15:12:47 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/De-Duping-Relationship-and-Inverse-Relationship-Records/m-p/1188759#M294795</guid>
      <dc:creator>kcroninkrein</dc:creator>
      <dc:date>2023-09-20T15:12:47Z</dc:date>
    </item>
  </channel>
</rss>

