<?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: MDX all descendants of anchestor where SAS.IdentityGroupName = &amp;quot;lead&amp;quot; in SAS Web Report Studio</title>
    <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/MDX-all-descendants-of-anchestor-where-SAS-IdentityGroupName/m-p/39981#M710</link>
    <description>Thanks to some guidance I can no reconsider my approach.&lt;BR /&gt;
Rather than having one giant MDX with conditional logic I use small parts&lt;BR /&gt;
of MDX different for each SAS metadata user group (OLAP member level security/MDX expression).&lt;BR /&gt;
&lt;BR /&gt;
That leads me now back to the very first question and problem. Assuming the user is in role&lt;BR /&gt;
SalesTeamLead then this expression applies, gets individual Seller Information:&lt;BR /&gt;
&lt;BR /&gt;
Ancestors(Head(Filter([DIM_SALES].AllMembers,[DIM_SALES].CurrentMember.Level.Name = 'SALESAGENT' and [DIM_SALES].CurrentMember.Name = 'SUB::SAS.Userid')).Item(0))&lt;BR /&gt;
&lt;BR /&gt;
how can I tweak it so it gets all the descendats of the group he/she is leading (part of).&lt;BR /&gt;
&lt;BR /&gt;
Dimension_Sales_Levels&lt;BR /&gt;
-Region&lt;BR /&gt;
---SalesTeam&lt;BR /&gt;
-----SalesAgents</description>
    <pubDate>Fri, 29 Apr 2011 08:35:57 GMT</pubDate>
    <dc:creator>metalray</dc:creator>
    <dc:date>2011-04-29T08:35:57Z</dc:date>
    <item>
      <title>MDX all descendants of anchestor where SAS.IdentityGroupName = "lead"</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/MDX-all-descendants-of-anchestor-where-SAS-IdentityGroupName/m-p/39975#M704</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I am looking at some MDX that takes into account the SAS.IdentityGroupName or SAS.IdentityGroups.&lt;BR /&gt;
If the user that has logged in, is part of the Group="SalesTeamLead" then&lt;BR /&gt;
this agent should see all descendants of the group he/she is part of.&lt;BR /&gt;
&lt;BR /&gt;
For example:&lt;BR /&gt;
&lt;BR /&gt;
Dimension_Sales_Levels&lt;BR /&gt;
-Region&lt;BR /&gt;
---SalesTeam&lt;BR /&gt;
-----SalesAgents&lt;BR /&gt;
&lt;BR /&gt;
Security_Groups&lt;BR /&gt;
-SalesAgent&lt;BR /&gt;
-SalesTeamLead&lt;BR /&gt;
&lt;BR /&gt;
Does someone &lt;BR /&gt;
&lt;BR /&gt;
Note: One user will only ever be part of one group.&lt;BR /&gt;
&lt;BR /&gt;
I tried the following as a filter for the management console but had no luck.&lt;BR /&gt;
&lt;BR /&gt;
SELECT&lt;BR /&gt;
IIF( SAS.IdentityGroupName IS 'SalesTeamLead'&lt;BR /&gt;
,&lt;BR /&gt;
Ancestors(Head(Filter([DIM_SALES].AllMembers,[DIM_SALES].CurrentMember.Level.Name &lt;BR /&gt;
= 'SALESAGENT' and [DIM_SALES].CurrentMember.Name = 'SUB::SAS.Userid')).Item(0))&lt;BR /&gt;
,&lt;BR /&gt;
NULL&lt;BR /&gt;
)&lt;BR /&gt;
FROM&lt;BR /&gt;
    [mycube]</description>
      <pubDate>Tue, 29 Mar 2011 14:13:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/MDX-all-descendants-of-anchestor-where-SAS-IdentityGroupName/m-p/39975#M704</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2011-03-29T14:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: MDX all descendants of anchestor where SAS.IdentityGroupName = "lead"</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/MDX-all-descendants-of-anchestor-where-SAS-IdentityGroupName/m-p/39976#M705</link>
      <description>Bob,&lt;BR /&gt;
What is the issue you are having? &lt;BR /&gt;
&lt;BR /&gt;
Is the user still able to see everything? Ensure that the security_subset option is on in the OLAP Cube. &lt;A href="http://sas-bi.blogspot.com/2011/01/implementing-olap-member-level-security.html" target="_blank"&gt;http://sas-bi.blogspot.com/2011/01/implementing-olap-member-level-security.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Is the edit expression returning an error? Here is documentation: &lt;A href="http://support.sas.com/documentation/cdl/en/olapug/59574/HTML/default/viewer.htm#a003212399.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/olapug/59574/HTML/default/viewer.htm#a003212399.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Also in 9.2.M3 - you can set up a security batch table. See the bottom of the pg:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/olapug/59574/HTML/default/viewer.htm#a003212372.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/olapug/59574/HTML/default/viewer.htm#a003212372.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
~ Angela</description>
      <pubDate>Tue, 29 Mar 2011 19:09:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/MDX-all-descendants-of-anchestor-where-SAS-IdentityGroupName/m-p/39976#M705</guid>
      <dc:creator>AngelaHall</dc:creator>
      <dc:date>2011-03-29T19:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: MDX all descendants of anchestor where SAS.IdentityGroupName = "lead"</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/MDX-all-descendants-of-anchestor-where-SAS-IdentityGroupName/m-p/39977#M706</link>
      <description>Hi Angela,&lt;BR /&gt;
Thanks for your help.&lt;BR /&gt;
We have used the security_subset option and that is very helpfull but to&lt;BR /&gt;
get to a security_subset, or a valid set of data from the OLAP cube for certain&lt;BR /&gt;
SalesAgents we need to have MDX filters that restricts access.&lt;BR /&gt;
&lt;BR /&gt;
Yes, the expression is returning an error, and I dont think my expression so far is anything close to correct nor is there any SAS documentation that comes close to such "advanced MDX".&lt;BR /&gt;
&lt;BR /&gt;
"Formula error - An invalid dimension name was encountered in the MDX statement - near: "[SAS].[IdentityGroupName]""&lt;BR /&gt;
&lt;BR /&gt;
The following part is correctly working:&lt;BR /&gt;
Ancestors(Head(Filter([DIM_SALES].AllMembers,[DIM_SALES].CurrentMember.Level.Name &lt;BR /&gt;
= 'SALESAGENT' and [DIM_SALES].CurrentMember.Name = 'SUB::SAS.Userid')).Item(0))&lt;BR /&gt;
&lt;BR /&gt;
BUT... I need that this filter only applies when the user is in role "SalesTeamLead"&lt;BR /&gt;
and wants to see all his/her SalesAgents.&lt;BR /&gt;
Additionally we would have various other filters for other roles (hence the IFF....).&lt;BR /&gt;
&lt;BR /&gt;
I have heard of permission tables/security batch tables but we are using SAS 9.2 and there is no plan to go to 9.2 M3 anytime soon, besides that, I think we still would need&lt;BR /&gt;
MDX filters to get the correct data for a certain user.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Bob</description>
      <pubDate>Wed, 30 Mar 2011 08:10:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/MDX-all-descendants-of-anchestor-where-SAS-IdentityGroupName/m-p/39977#M706</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2011-03-30T08:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: MDX all descendants of anchestor where SAS.IdentityGroupName = "lead"</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/MDX-all-descendants-of-anchestor-where-SAS-IdentityGroupName/m-p/39978#M707</link>
      <description>In your IIF statement - have you tried to replace:&lt;BR /&gt;
              IIF( SAS.IdentityGroupName IS 'SalesTeamLead'&lt;BR /&gt;
&lt;BR /&gt;
with:&lt;BR /&gt;
              IIF(   "SUB::SAS.IdentityGroupName" IS "SalesTeamLead"&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
~ Angela&lt;BR /&gt;
&lt;BR /&gt;
(The only documentation I have seen is: &lt;A href="http://support.sas.com/documentation/cdl/en/olapug/59574/HTML/default/viewer.htm#a003212399.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/olapug/59574/HTML/default/viewer.htm#a003212399.htm&lt;/A&gt; - so seems like we need a SASGF paper for 2012 in Orlando!)</description>
      <pubDate>Wed, 30 Mar 2011 13:52:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/MDX-all-descendants-of-anchestor-where-SAS-IdentityGroupName/m-p/39978#M707</guid>
      <dc:creator>AngelaHall</dc:creator>
      <dc:date>2011-03-30T13:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: MDX all descendants of anchestor where SAS.IdentityGroupName = "lead"</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/MDX-all-descendants-of-anchestor-where-SAS-IdentityGroupName/m-p/39979#M708</link>
      <description>Hi Angela,&lt;BR /&gt;
&lt;BR /&gt;
May thanks for the help! I dont blame SAS for not having such MDX examples in there documentation - it not what most people need, I guess.&lt;BR /&gt;
&lt;BR /&gt;
IIF( 'SUB::SAS.IdentityGroupName' IS 'SalesTeamLead'&lt;BR /&gt;
,&lt;BR /&gt;
Ancestors(Head(Filter([DIM_SALES].AllMembers,[DIM_SALES].CurrentMember.Level.Name = 'SALESAGENT' and [DIM_SALES].CurrentMember.Name = 'SUB::SAS.Userid')).Item(0))&lt;BR /&gt;
,&lt;BR /&gt;
NULL&lt;BR /&gt;
)&lt;BR /&gt;
&lt;BR /&gt;
Error: Formula error - The argument type is incorrect - &lt;BR /&gt;
in the "IS" function near: "SUB::SAS.IdentityGroupName"&lt;BR /&gt;
&lt;BR /&gt;
I just wonder how to use the Identity Driven Properties in conjunction with each other.&lt;BR /&gt;
&lt;BR /&gt;
Bob</description>
      <pubDate>Thu, 31 Mar 2011 07:47:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/MDX-all-descendants-of-anchestor-where-SAS-IdentityGroupName/m-p/39979#M708</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2011-03-31T07:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: MDX all descendants of anchestor where SAS.IdentityGroupName = "lead"</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/MDX-all-descendants-of-anchestor-where-SAS-IdentityGroupName/m-p/39980#M709</link>
      <description>Since I have not made any progress with finding the right syntax I thought about a&lt;BR /&gt;
CASE statement. This works in MS Analysis Services but I am not sure if it does with SAS OLAP.&lt;BR /&gt;
&lt;BR /&gt;
CASE 'SUB::SAS.IdentityGroups' AS var&lt;BR /&gt;
WHEN var CONTAINS 'SalesTeamLead' THEN&lt;BR /&gt;
'agent should see all descendants of the group he/she is part of'&lt;BR /&gt;
WHEN var CONTAINS 'SalesPerson' THEN&lt;BR /&gt;
Ancestors(Head(Filter([DIM_SALES].AllMembers,[DIM_SALES].CurrentMember.Level.Name = 'SALESAGENT' and [DIM_SALES].CurrentMember.Name = 'SUB::SAS.Userid')).Item(0))&lt;BR /&gt;
END&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Original:&lt;BR /&gt;
CASE [input_expression]&lt;BR /&gt;
WHEN when_expression THEN when_true_result_expression&lt;BR /&gt;
[...n]&lt;BR /&gt;
[ELSE else_result_expression]&lt;BR /&gt;
END&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://msdn.microsoft.com/en-us/library/ms144841.aspx" target="_blank"&gt;http://msdn.microsoft.com/en-us/library/ms144841.aspx&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
SAS.IdentityGroups returns multiple values so we need to check if one of them is x. There is a SAS tutorial but it only shows how to add an identity driven property to an mdx expression not how to use those as part of an expression &lt;A href="http://support.sas.com/documentation/cdl/en/olapug/59574/HTML/default/viewer.htm#a003212399.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/olapug/59574/HTML/default/viewer.htm#a003212399.htm&lt;/A&gt;</description>
      <pubDate>Wed, 27 Apr 2011 09:50:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/MDX-all-descendants-of-anchestor-where-SAS-IdentityGroupName/m-p/39980#M709</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2011-04-27T09:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: MDX all descendants of anchestor where SAS.IdentityGroupName = "lead"</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/MDX-all-descendants-of-anchestor-where-SAS-IdentityGroupName/m-p/39981#M710</link>
      <description>Thanks to some guidance I can no reconsider my approach.&lt;BR /&gt;
Rather than having one giant MDX with conditional logic I use small parts&lt;BR /&gt;
of MDX different for each SAS metadata user group (OLAP member level security/MDX expression).&lt;BR /&gt;
&lt;BR /&gt;
That leads me now back to the very first question and problem. Assuming the user is in role&lt;BR /&gt;
SalesTeamLead then this expression applies, gets individual Seller Information:&lt;BR /&gt;
&lt;BR /&gt;
Ancestors(Head(Filter([DIM_SALES].AllMembers,[DIM_SALES].CurrentMember.Level.Name = 'SALESAGENT' and [DIM_SALES].CurrentMember.Name = 'SUB::SAS.Userid')).Item(0))&lt;BR /&gt;
&lt;BR /&gt;
how can I tweak it so it gets all the descendats of the group he/she is leading (part of).&lt;BR /&gt;
&lt;BR /&gt;
Dimension_Sales_Levels&lt;BR /&gt;
-Region&lt;BR /&gt;
---SalesTeam&lt;BR /&gt;
-----SalesAgents</description>
      <pubDate>Fri, 29 Apr 2011 08:35:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/MDX-all-descendants-of-anchestor-where-SAS-IdentityGroupName/m-p/39981#M710</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2011-04-29T08:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: MDX all descendants of anchestor where SAS.IdentityGroupName = "lead"</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/MDX-all-descendants-of-anchestor-where-SAS-IdentityGroupName/m-p/39982#M711</link>
      <description>solution:&lt;BR /&gt;
&lt;BR /&gt;
SELECT&lt;BR /&gt;
Descendants(&lt;BR /&gt;
Ancestor(&lt;BR /&gt;
Head(&lt;BR /&gt;
Filter(&lt;BR /&gt;
[DIM_SALES].AllMembers,[DIM_SALES].CurrentMember.Level.Name = 'SALESAGENT_ID' and [DIM_SALES].CurrentMember.Name = 'tedas2')&lt;BR /&gt;
).Item(0&lt;BR /&gt;
)&lt;BR /&gt;
,2)&lt;BR /&gt;
)&lt;BR /&gt;
ON COLUMNS&lt;BR /&gt;
FROM&lt;BR /&gt;
    [mycube]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ancestor instead of AncestorS</description>
      <pubDate>Tue, 03 May 2011 16:01:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/MDX-all-descendants-of-anchestor-where-SAS-IdentityGroupName/m-p/39982#M711</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2011-05-03T16:01:02Z</dc:date>
    </item>
  </channel>
</rss>

