<?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>Purple Frog Systems &#187; WHERE</title>
	<atom:link href="http://www.purplefrogsystems.com/blog/tag/where/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.purplefrogsystems.com/blog</link>
	<description>Business Intelligence Consultancy</description>
	<lastBuildDate>Mon, 23 Jan 2012 09:11:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>MDX Sub select Vs WHERE clause</title>
		<link>http://www.purplefrogsystems.com/blog/2010/03/mdx-sub-select-vs-where-clause/</link>
		<comments>http://www.purplefrogsystems.com/blog/2010/03/mdx-sub-select-vs-where-clause/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 09:23:15 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Analysis Services]]></category>
		<category><![CDATA[Cube]]></category>
		<category><![CDATA[MDX]]></category>
		<category><![CDATA[WHERE]]></category>

		<guid isPermaLink="false">http://www.purplefrogsystems.com/blog/?p=36</guid>
		<description><![CDATA[I&#8217;ve just read an interesting thread on the SQL Server Developer Center forum, regarding how to filter results. Specifically the difference in MDX between using a subselect SELECT x on COLUMNS, y on ROWS FROM ( SELECT z on COLUMNS FROM cube)) or using a where clause SELECT x on COLUMNS, y on ROWS FROM [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just read an interesting thread on the SQL Server Developer Center forum, regarding how to filter results. Specifically the difference in MDX between using a subselect</p>
<pre>
<p class="code">SELECT x on COLUMNS, y on ROWS
FROM ( SELECT z on COLUMNS FROM cube))

</pre>
<p>or using a where clause</p>
<pre>
<p class="code">SELECT x on COLUMNS, y on ROWS
FROM cube
WHERE z

</pre>
<p>In a simple query they produce the same results, but what is the actual difference? You can read the full thread <a href="http://social.msdn.microsoft.com/Forums/en-US/sqlanalysisservices/thread/3f0a2aba-93de-4f67-8402-181798a6225f" target="_blank">here</a>, but to summarise Darren Gosbell&#8217;s response&#8230;</p>
<p>Using the WHERE clause sets the query context and consequently the CurrentMember. This then enables functions such as YTD and PerdiodsToDate to work.</p>
<p>Using a subselect can provide improved performance, but does not set the context.</p>
<p>Simples..!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.purplefrogsystems.com/blog/2010/03/mdx-sub-select-vs-where-clause/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

