<?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: Flattening a Hierarchy in SAS VA in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Flattening-a-Hierarchy-in-SAS-VA/m-p/375954#M7642</link>
    <description>&lt;P&gt;Thanks Fredrike!!&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jul 2017 09:24:06 GMT</pubDate>
    <dc:creator>KarunaT</dc:creator>
    <dc:date>2017-07-14T09:24:06Z</dc:date>
    <item>
      <title>Flattening a Hierarchy in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Flattening-a-Hierarchy-in-SAS-VA/m-p/375571#M7625</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have Employee data in which Employee id and Manager id are present.&lt;/P&gt;&lt;P&gt;An employee can have many levels of Managers for eg. his Manager, his Manager's Manager and so on.&lt;/P&gt;&lt;P&gt;Is there any way by which when I click on Employee, I get the data like&lt;/P&gt;&lt;P&gt;EMP -&amp;gt; his Manager -&amp;gt; his Manager's Manager -&amp;gt; upto the level specified in SAS VA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!!&lt;/P&gt;&lt;P&gt;Karuna&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 06:27:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Flattening-a-Hierarchy-in-SAS-VA/m-p/375571#M7625</guid>
      <dc:creator>KarunaT</dc:creator>
      <dc:date>2017-07-13T06:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Flattening a Hierarchy in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Flattening-a-Hierarchy-in-SAS-VA/m-p/375579#M7626</link>
      <description>&lt;P&gt;Hi - You can surely just&amp;nbsp;create a new Hieracrchy. As long as you've got these fields in your data, you can create the hierarchy. Then, clicking on an employee in, for example, a chart object, will allow a report user to drill down to the levels you've put in the hierarchy.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have done the same sort of thing for Sales Region --&amp;gt; Sales Manager --&amp;gt; Sales Area --&amp;gt; Sales Representative.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 08:14:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Flattening-a-Hierarchy-in-SAS-VA/m-p/375579#M7626</guid>
      <dc:creator>ScottJP</dc:creator>
      <dc:date>2017-07-13T08:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Flattening a Hierarchy in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Flattening-a-Hierarchy-in-SAS-VA/m-p/375584#M7627</link>
      <description>&lt;P&gt;Thanks for the prompt reply, Scott.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I think i was not able to explain the problem in hand.&lt;/P&gt;&lt;P&gt;I too have created a Geo Hierarchy with Country, State and City.&lt;/P&gt;&lt;P&gt;But currently, I have two fields Emp Id and Mngr Id, for 1st level, we will find the Mngr Id for the Employee; for the 2nd level, the Mngr id will become Emp Id and we will find the Mngr Id till we get to the highest Level.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope I am clear this time.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 08:39:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Flattening-a-Hierarchy-in-SAS-VA/m-p/375584#M7627</guid>
      <dc:creator>KarunaT</dc:creator>
      <dc:date>2017-07-13T08:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: Flattening a Hierarchy in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Flattening-a-Hierarchy-in-SAS-VA/m-p/375593#M7628</link>
      <description>&lt;P&gt;I don't think you can achieve that in VA, I tried some different ways&amp;nbsp; but did not get what I think you want &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I have done this a couple of times and in all of them I have flattened the hierarchy in base-code before I loaded it into VA.&lt;/P&gt;
&lt;P&gt;Like:&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; test;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;length&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; uid mid &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;8&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; uname mname $&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;32&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; uid mid uname;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;datalines&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;1 10 usr1&lt;/P&gt;
&lt;P&gt;2 10 usr2&lt;/P&gt;
&lt;P&gt;3 20 usr3&lt;/P&gt;
&lt;P&gt;4 20 usr4&lt;/P&gt;
&lt;P&gt;5 30 usr5&lt;/P&gt;
&lt;P&gt;6 40 usr6&lt;/P&gt;
&lt;P&gt;7 50 usr7&lt;/P&gt;
&lt;P&gt;10 100 mgr10&lt;/P&gt;
&lt;P&gt;20 100 mgr20&lt;/P&gt;
&lt;P&gt;30 200 mgr30&lt;/P&gt;
&lt;P&gt;40 300 mgr40&lt;/P&gt;
&lt;P&gt;50 . mgr50&lt;/P&gt;
&lt;P&gt;100 1000 mgr100&lt;/P&gt;
&lt;P&gt;200 1000 mgr200&lt;/P&gt;
&lt;P&gt;300 . mgr300&lt;/P&gt;
&lt;P&gt;1000 . mgr1000&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;create&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;table&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; hier &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;select&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; a.uname, b.uname &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; mgrname_lev1, c.uname &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; mgrname_lev2, d.uname &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; mgrname_lev3 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; test a&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;left&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;join&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; test b&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;on&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; a.mid = b.uid&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;left&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;join&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; test c&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;on&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; b.mid = c.uid&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;left&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;join&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; test d&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;on&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; c.mid = d.uid&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;order&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;by&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;3&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;4&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 09:20:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Flattening-a-Hierarchy-in-SAS-VA/m-p/375593#M7628</guid>
      <dc:creator>FredrikE</dc:creator>
      <dc:date>2017-07-13T09:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Flattening a Hierarchy in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Flattening-a-Hierarchy-in-SAS-VA/m-p/375923#M7638</link>
      <description>&lt;P&gt;Hi Fredrike,&lt;/P&gt;&lt;P&gt;Thanks for your Reply. This is exactly what I was looking for.&lt;/P&gt;&lt;P&gt;But in my case the level of Managers is unknown. An employee can have two levels of Managers above him while other might have six levels of Managers.&lt;/P&gt;&lt;P&gt;Is there any way, that can be achieved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Karuna&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2017 05:17:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Flattening-a-Hierarchy-in-SAS-VA/m-p/375923#M7638</guid>
      <dc:creator>KarunaT</dc:creator>
      <dc:date>2017-07-14T05:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Flattening a Hierarchy in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Flattening-a-Hierarchy-in-SAS-VA/m-p/375950#M7641</link>
      <description>&lt;P&gt;I usually descide the number of levels possible, let say 10 and then just adds more left joins to my example.&lt;/P&gt;
&lt;P&gt;Next step is to descide what to do with the "branches" that does not go all the way to 10.&lt;/P&gt;
&lt;P&gt;One way is to let them be empty and another is to inherit the previous value all the way up to level 10.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All of this depends on how you want to use the hierarchy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Fredrik&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2017 09:12:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Flattening-a-Hierarchy-in-SAS-VA/m-p/375950#M7641</guid>
      <dc:creator>FredrikE</dc:creator>
      <dc:date>2017-07-14T09:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Flattening a Hierarchy in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Flattening-a-Hierarchy-in-SAS-VA/m-p/375954#M7642</link>
      <description>&lt;P&gt;Thanks Fredrike!!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2017 09:24:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Flattening-a-Hierarchy-in-SAS-VA/m-p/375954#M7642</guid>
      <dc:creator>KarunaT</dc:creator>
      <dc:date>2017-07-14T09:24:06Z</dc:date>
    </item>
  </channel>
</rss>

