<?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: Get ancestors for each children and ratio in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Get-ancestors-for-each-children-and-ratio/m-p/491834#M129100</link>
    <description>&lt;P&gt;There are tree based solutions on here that would group a family into a the correct groups though it won't set up the data in the structure you wanted.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://gist.github.com/statgeek/14e3aa2a9f718f551cd98134e9ceed30" target="_blank"&gt;https://gist.github.com/statgeek/14e3aa2a9f718f551cd98134e9ceed30&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This isn't a particular easy problem to solve because of the recursive nature. If you have issues please post your code to the forum including sample data so we can easily help you out.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 01 Sep 2018 17:08:52 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-09-01T17:08:52Z</dc:date>
    <item>
      <title>Get ancestors for each children and ratio</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-ancestors-for-each-children-and-ratio/m-p/491815#M129083</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got a input dataset (companies with 1 or many owners in unknown number of levels). I got the following variables in the input dataset:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;childID, ratio, from_date to_date , parentID ratio&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need the ancestors for each children per day (or period) relations with stated owner_ratio. Eg. For the days in 2017. There can be many levels in the hierarchy. Each child owns ratio in the parent companies.&lt;/P&gt;&lt;P&gt;I want the output the be something like this:&lt;/P&gt;&lt;P&gt;Day childID owner_ratio &amp;nbsp;parentID &amp;nbsp;parentID owner_ratio &amp;nbsp;&amp;nbsp;&amp;nbsp;parent_to_parent_ID parent_to_parent_ratio parent_to_parent_parent_ratio&lt;/P&gt;&lt;P&gt;Do anyone have ideas/code to solve it? Can it be done in the same data step (parent child resolving) eller do I have to merge the extra wanted data in the output after the hierachi has been resolved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Sep 2018 09:43:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-ancestors-for-each-children-and-ratio/m-p/491815#M129083</guid>
      <dc:creator>ANLYNG</dc:creator>
      <dc:date>2018-09-01T09:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Get ancestors for each children and ratio</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-ancestors-for-each-children-and-ratio/m-p/491834#M129100</link>
      <description>&lt;P&gt;There are tree based solutions on here that would group a family into a the correct groups though it won't set up the data in the structure you wanted.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://gist.github.com/statgeek/14e3aa2a9f718f551cd98134e9ceed30" target="_blank"&gt;https://gist.github.com/statgeek/14e3aa2a9f718f551cd98134e9ceed30&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This isn't a particular easy problem to solve because of the recursive nature. If you have issues please post your code to the forum including sample data so we can easily help you out.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Sep 2018 17:08:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-ancestors-for-each-children-and-ratio/m-p/491834#M129100</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-01T17:08:52Z</dc:date>
    </item>
  </channel>
</rss>

