<?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 Cube returns all ancestor siblings if member cant be found in hierarchy. in SAS Web Report Studio</title>
    <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Cube-returns-all-ancestor-siblings-if-member-cant-be-found-in/m-p/22068#M332</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; We figured out that there was an error in the hierarchy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jun 2011 15:09:29 GMT</pubDate>
    <dc:creator>metalray</dc:creator>
    <dc:date>2011-06-29T15:09:29Z</dc:date>
    <item>
      <title>Cube returns all ancestor siblings if member cant be found in hierarchy.</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Cube-returns-all-ancestor-siblings-if-member-cant-be-found-in/m-p/22066#M330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Friends of SAS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below we have the nifty MDX filter expressions that gets all descendants from 2 levels above where the user id can be found in the hierarchy.&lt;BR /&gt;The MDX works but it gets all the siblings as well not only the main agency that the user is actually in (at bottom level).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;General Agency&lt;BR /&gt;------Main Agency&lt;BR /&gt;---------Team&lt;BR /&gt;------------Seller_ID&lt;/P&gt;&lt;P&gt;with Acensors.....2 we want to go 2 levels up and get only the Main Agency&lt;BR /&gt;the seller is part of and not all main agencies-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;First option of MDX:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Descendants(&lt;BR /&gt;Ancestor(&lt;BR /&gt;Head(&lt;BR /&gt;Filter(&lt;BR /&gt;[DIM_&lt;BR /&gt;Sales].AllMembers,[DIM_Sales].CurrentMember.Level.Name = Seller_ID' and [DIM_Sales].CurrentMember.Name = 'SUB::SAS.Userid') &lt;BR /&gt;).Item(0&lt;/P&gt;&lt;P&gt;)&lt;BR /&gt;,2)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Second option of MDX:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Generate&lt;BR /&gt;(&lt;BR /&gt;Filter&lt;BR /&gt;(&lt;BR /&gt;&amp;nbsp; [Dim_Sales].ALLMEMBERS&lt;BR /&gt;&amp;nbsp; ,[Dim_Sales].CurrentMember.LEVEL.NAME = 'Seller_ID'&lt;BR /&gt;&amp;nbsp; AND&lt;BR /&gt;&amp;nbsp; [Dim_Sales].CurrentMember.Name = 'SUB::SAS.Userid'&lt;BR /&gt;)&lt;BR /&gt;,Descendants&lt;BR /&gt;(&lt;BR /&gt;&amp;nbsp; Ancestor([Dim_Sales].CurrentMember,2)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Problem:&lt;/STRONG&gt;&lt;BR /&gt;We noticed that if the user is in the hierarchy SAS gets/returns everything (even the main agency the user is not part of). &lt;BR /&gt;Both MDX Filters behave the same.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So the user will be able to see not only all the descendants of his&lt;BR /&gt;agency (2 levels above) but can also see all the other agencies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would an enhanced MDX statement look that only the main agencies the userID is in the hierarchy (instead of everything).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Bob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 09:04:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/Cube-returns-all-ancestor-siblings-if-member-cant-be-found-in/m-p/22066#M330</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2011-06-28T09:04:26Z</dc:date>
    </item>
    <item>
      <title>Cube returns all ancestor siblings if member cant be found in hierarchy.</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Cube-returns-all-ancestor-siblings-if-member-cant-be-found-in/m-p/22067#M331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We dont have to problem with the team level. A team lead, also part of the level, sees only his/her team and not the other teams that are silbings to that team.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Team (specific user group) MDX:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Descendants(&lt;BR /&gt;Ancestor(&lt;BR /&gt;Head(&lt;BR /&gt;Filter(&lt;BR /&gt;[DIM_&lt;BR /&gt;Sales].AllMembers,[DIM_Sales].CurrentMember.Level.Name = Seller_ID' and [DIM_Sales].CurrentMember.Name = 'SUB::SAS.Userid') &lt;BR /&gt;).Item(0&lt;/P&gt;&lt;P&gt;)&lt;BR /&gt;,1)&lt;BR /&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 09:32:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/Cube-returns-all-ancestor-siblings-if-member-cant-be-found-in/m-p/22067#M331</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2011-06-28T09:32:30Z</dc:date>
    </item>
    <item>
      <title>Cube returns all ancestor siblings if member cant be found in hierarchy.</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Cube-returns-all-ancestor-siblings-if-member-cant-be-found-in/m-p/22068#M332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; We figured out that there was an error in the hierarchy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2011 15:09:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/Cube-returns-all-ancestor-siblings-if-member-cant-be-found-in/m-p/22068#M332</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2011-06-29T15:09:29Z</dc:date>
    </item>
  </channel>
</rss>

