<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blogging about all things SAS &#187; SAS OLAP MDX</title>
	<atom:link href="http://blog.saasinct.com/tag/sas-olap-mdx/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.saasinct.com</link>
	<description>::       Sharing with the world everything we discover about SAS.</description>
	<lastBuildDate>Fri, 18 Nov 2011 07:19:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Any MDX Guru&#8217;s out there?</title>
		<link>http://blog.saasinct.com/2009/05/15/any-mdx-gurus-out-there/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=any-mdx-gurus-out-there</link>
		<comments>http://blog.saasinct.com/2009/05/15/any-mdx-gurus-out-there/#comments</comments>
		<pubDate>Thu, 14 May 2009 12:15:35 +0000</pubDate>
		<dc:creator>Shane Gibson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[SAS OLAP MDX]]></category>

		<guid isPermaLink="false">http://blog.sasinct.com/2009/05/15/any-mdx-gurus-out-there/</guid>
		<description><![CDATA[Update &#8211; 30 May 2009 Thanks to a comment by Mathias (and followup email &#8211; thanks dude) the following code as a calculated measure in the OLAP cube did exactly what I needed: ([Measures].[Costsum],[KeepDim1].currentmember,[KeepDim2].currentmember,[LoseDim1].currentmember,[LodeDim2].defaultmember) / ([Measures].[QtyAVG],[KeepDim1].currentmember,[KeepDim2].currentmember,[LoseDim1].currentmember,[LodeDim2].defaultmember) The trick was you have to specifically exclude all dimensions you dont want included in the calc usinf defaultmember [...]]]></description>
			<content:encoded><![CDATA[<p>Update &#8211; 30 May 2009</p>
<p>Thanks to a comment by Mathias (and followup email &#8211; thanks dude)  the following code as a calculated measure in the OLAP cube did exactly what I needed:</p>
<p><font color="#999999">([Measures].[Costsum],[KeepDim1].currentmember,[KeepDim2].currentmember,[LoseDim1].currentmember,[LodeDim2].defaultmember)</font></p>
<p><font color="#999999">/</font></p>
<p><font color="#999999">([Measures].[QtyAVG],[KeepDim1].currentmember,[KeepDim2].currentmember,[LoseDim1].currentmember,[LodeDim2].defaultmember)</font></p>
<p>The trick was you have to specifically exclude all dimensions you dont want included in the calc usinf defaultmember otherwise the calc will use currentmember for it.</p>
<p>&#8212;End update</p>
<p>So im struggling with MDX and SAS at the mo.</p>
<p>I have a cube that has a number of dimension, for example:</p>
<ul>
<li>Product</li>
<li>Customer</li>
<li>Period</li>
<li>Location</li>
<li>Sales Person</li>
</ul>
<p>And I have some measures</p>
<ul>
<li>Cost</li>
<li>Quantitiy</li>
</ul>
<p>Now I want to calculate unit cost (i.e Cost / Quantitiy) but (and here is my problem) I only ever want to calculate it based on a combination of the Product and Sales Person dimensions.</p>
<p>So if only Product and Sales Person are added to the cube view (in WRS) then I can just divide Cost by Quantity.</p>
<p>But as soon as I add Organisation (or any other dimension), the cost gets split by the multiple organisation dimension members and therefore the dynamic calculation doesnt work, so I need to hardcode the formula to only pick up the cost based soley on the Product and Sales Person dimensions.</p>
<p>Any suggestions (using custom measures in OLAP cubes, or custom data item in Information Maps, im easy)?</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.saasinct.com%2F2009%2F05%2F15%2Fany-mdx-gurus-out-there%2F&amp;title=Any%20MDX%20Guru%26%238217%3Bs%20out%20there%3F" id="wpa2a_2"><img src="http://blog.saasinct.com/wp-content/plugins/add-to-any/share_save_256_24.png" width="256" height="24" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.saasinct.com/2009/05/15/any-mdx-gurus-out-there/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

