<?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: SAS OLAP Calculated Member Infinite Recursion Error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-OLAP-Calculated-Member-Infinite-Recursion-Error/m-p/555845#M154745</link>
    <description>&lt;P&gt;Have you seen this?&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/45/787.html" target="_blank"&gt;http://support.sas.com/kb/45/787.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 03 May 2019 05:42:41 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2019-05-03T05:42:41Z</dc:date>
    <item>
      <title>SAS OLAP Calculated Member Infinite Recursion Error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-OLAP-Calculated-Member-Infinite-Recursion-Error/m-p/555742#M154684</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Infinite Recursion Error.png" style="width: 506px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29173i4A4C4E1BED990C95/image-size/large?v=v2&amp;amp;px=999" role="button" title="Infinite Recursion Error.png" alt="Infinite Recursion Error.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a calculated member in my SAS OLAP cube using some conditional logic. In summary I need the member to abide by the following logic. If the prof product is&amp;nbsp;ALLPP then return the amount associated with TC, if not look to see if the prof product id rolls up to TC. If it does, return the amount associated with the current member. If not, return 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is a quick summary of the prof product dimension.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Parent&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Child&lt;/P&gt;&lt;P&gt;#root&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ALLPP&lt;/P&gt;&lt;P&gt;ALLPP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TC&lt;/P&gt;&lt;P&gt;ALLPP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NP&lt;/P&gt;&lt;P&gt;TC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RC&lt;/P&gt;&lt;P&gt;TC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I need to do is exclude NP from the member being returned. If there is a better way to accomplish this, I am certainly open to suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code I have so far. &amp;amp;Cube_Name and &amp;amp;CM return the MDX path for where my test member should sit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	/*146*/ DEFINE MEMBER "[&amp;amp;Cube_Name.].&amp;amp;CM..[Provision_Stat_Test]" AS
				" (iif(([Prof_Product].CurrentMember = [Prof_Product].[All Profitability Products].[ALLPP]),
				  ([Account].[All Account].[All_Accounts].[IS_Accounts].[NetInc].[PreTaxInc_TE].[NetIntInc_NP_TE].[Provision].[Provision_PM].[Prov_byCalc],[Prof_Product].[All Profitability Products].[ALLPP].[TC]),
				  (iif((Ancestor([Prof_Product].CurrentMember,[Prof_Product].[Lev02_Prof_Product]) = [Prof_Product].[All Profitability Products].[ALLPP].[TC]),
				  ([Account].[All Account].[All_Accounts].[IS_Accounts].[NetInc].[PreTaxInc_TE].[NetIntInc_NP_TE].[Provision].[Provision_PM].[Prov_byCalc],[Prof_Product].CurrentMember),
				  0))
				* (-1))
				, SOLVE_ORDER=5";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 May 2019 19:54:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-OLAP-Calculated-Member-Infinite-Recursion-Error/m-p/555742#M154684</guid>
      <dc:creator>HorneC</dc:creator>
      <dc:date>2019-05-02T19:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAS OLAP Calculated Member Infinite Recursion Error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-OLAP-Calculated-Member-Infinite-Recursion-Error/m-p/555845#M154745</link>
      <description>&lt;P&gt;Have you seen this?&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/45/787.html" target="_blank"&gt;http://support.sas.com/kb/45/787.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 05:42:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-OLAP-Calculated-Member-Infinite-Recursion-Error/m-p/555845#M154745</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-05-03T05:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS OLAP Calculated Member Infinite Recursion Error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-OLAP-Calculated-Member-Infinite-Recursion-Error/m-p/555893#M154770</link>
      <description>&lt;P&gt;I did not see that. I am not sure if that is causing my problem as I am running my code in SAS EG, but I will check with my admin. Thank you!!&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 11:42:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-OLAP-Calculated-Member-Infinite-Recursion-Error/m-p/555893#M154770</guid>
      <dc:creator>HorneC</dc:creator>
      <dc:date>2019-05-03T11:42:26Z</dc:date>
    </item>
  </channel>
</rss>

