<?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>Panorama Business Intelligence &#187; MDX</title>
	<atom:link href="http://www.panorama.com/blog/category/mdx/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.panorama.com/blog</link>
	<description>Making businesses better - not just better informed</description>
	<lastBuildDate>Mon, 06 Feb 2012 16:12:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Non Empty Behavior in Panorama</title>
		<link>http://www.panorama.com/blog/2010/03/non-empty-behavior-in-panorama/</link>
		<comments>http://www.panorama.com/blog/2010/03/non-empty-behavior-in-panorama/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 17:04:07 +0000</pubDate>
		<dc:creator>Miky Schreiber</dc:creator>
				<category><![CDATA[MDX]]></category>

		<guid isPermaLink="false">http://www.panorama.com/blog/?p=364</guid>
		<description><![CDATA[
Non Empty Behavior is a very good optimization method you can use with your calculated measures. It allows you to define a list of measures that their emptiness defines the emptiness of your calculated measure. To understand this, look at the picture (taken from the MSDN):

This is the calculation expressions pane from the Calculations tab [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>Non Empty Behavior is a very good optimization method you can use with your calculated measures. It allows you to define a list of measures that their emptiness defines the emptiness of your calculated measure. To understand this, look at the picture (taken from the <a href="http://msdn.microsoft.com/en-us/library/ms166568.aspx">MSDN</a>):</p>
<p><img src="http://www.miky-schreiber.com/Blog/content/binary/NonEmptyBehavior.gif" border="0" alt="" /></p>
<p>This is the calculation expressions pane from the Calculations tab in the cube designer. From MSDN:</p>
<p>&#8220;The measures you specify in the <strong>Non-empty behavior</strong> list are used to resolve NON EMPTY queries in MDX. When you specify one or more measures in the <strong>Non-empty behavior</strong> list, Analysis Services treats the calculated member as empty if all the specified measures are empty. If the <strong>Non-empty behavior</strong> property is blank, Analysis Services must evaluate the calculated member itself to determine whether the member is empty.&#8221;</p>
<p>This is not new. NEB is quite old feature in SSAS. The new thing (at least for me) is that NEB can also be used in Panorama formulas! For example, M1+M2 /*NONEMPTY_BEHAVIOR={M1,M2}*/ will apply M1 &amp; M2 as NEB. You can see more Panorama optimization methods <a href="http://tech.panorama.com/index.php/category-table/367-a">here</a>.</div>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow" target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2010%2F03%2Fnon-empty-behavior-in-panorama%2F" title="Technorati"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2010%2F03%2Fnon-empty-behavior-in-panorama%2F&amp;title=Non%20Empty%20Behavior%20in%20Panorama&amp;notes=%0D%0A%0D%0ANon%20Empty%20Behavior%20is%20a%20very%20good%20optimization%20method%20you%20can%20use%20with%20your%20calculated%20measures.%20It%20allows%20you%20to%20define%20a%20list%20of%20measures%20that%20their%20emptiness%20defines%20the%20emptiness%20of%20your%20calculated%20measure.%20To%20understand%20this%2C%20look%20at%20the%20pic" title="del.icio.us"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2010%2F03%2Fnon-empty-behavior-in-panorama%2F&amp;title=Non%20Empty%20Behavior%20in%20Panorama&amp;bodytext=%0D%0A%0D%0ANon%20Empty%20Behavior%20is%20a%20very%20good%20optimization%20method%20you%20can%20use%20with%20your%20calculated%20measures.%20It%20allows%20you%20to%20define%20a%20list%20of%20measures%20that%20their%20emptiness%20defines%20the%20emptiness%20of%20your%20calculated%20measure.%20To%20understand%20this%2C%20look%20at%20the%20pic" title="Digg"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://twitter.com/home/?status=tip%20@Techmeme%20http%3A%2F%2Fwww.panorama.com%2Fblog%2F2010%2F03%2Fnon-empty-behavior-in-panorama%2F%20Non%20Empty%20Behavior%20in%20Panorama" title="Suggest to Techmeme via Twitter"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/techmeme.png" title="Suggest to Techmeme via Twitter" alt="Suggest to Techmeme via Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2010%2F03%2Fnon-empty-behavior-in-panorama%2F&amp;t=Non%20Empty%20Behavior%20in%20Panorama" title="Facebook"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.blogospherenews.com/submit.php?url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2010%2F03%2Fnon-empty-behavior-in-panorama%2F&amp;title=Non%20Empty%20Behavior%20in%20Panorama" title="Blogosphere News"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/blogospherenews.png" title="Blogosphere News" alt="Blogosphere News" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2010%2F03%2Fnon-empty-behavior-in-panorama%2F&amp;title=Non%20Empty%20Behavior%20in%20Panorama&amp;annotation=%0D%0A%0D%0ANon%20Empty%20Behavior%20is%20a%20very%20good%20optimization%20method%20you%20can%20use%20with%20your%20calculated%20measures.%20It%20allows%20you%20to%20define%20a%20list%20of%20measures%20that%20their%20emptiness%20defines%20the%20emptiness%20of%20your%20calculated%20measure.%20To%20understand%20this%2C%20look%20at%20the%20pic" title="Google Bookmarks"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2010%2F03%2Fnon-empty-behavior-in-panorama%2F&amp;title=Non%20Empty%20Behavior%20in%20Panorama&amp;source=Panorama+Business+Intelligence+Making+businesses+better+-+not+just+better+informed&amp;summary=%0D%0A%0D%0ANon%20Empty%20Behavior%20is%20a%20very%20good%20optimization%20method%20you%20can%20use%20with%20your%20calculated%20measures.%20It%20allows%20you%20to%20define%20a%20list%20of%20measures%20that%20their%20emptiness%20defines%20the%20emptiness%20of%20your%20calculated%20measure.%20To%20understand%20this%2C%20look%20at%20the%20pic" title="LinkedIn"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow" target="_blank" href="http://www.friendfeed.com/share?title=Non%20Empty%20Behavior%20in%20Panorama&amp;link=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2010%2F03%2Fnon-empty-behavior-in-panorama%2F" title="FriendFeed"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.panorama.com/blog/2010/03/non-empty-behavior-in-panorama/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Text in Measures</title>
		<link>http://www.panorama.com/blog/2010/03/text-in-measures/</link>
		<comments>http://www.panorama.com/blog/2010/03/text-in-measures/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 06:26:49 +0000</pubDate>
		<dc:creator>Miky Schreiber</dc:creator>
				<category><![CDATA[MDX]]></category>
		<category><![CDATA[NovaView Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.panorama.com/blog/?p=361</guid>
		<description><![CDATA[I knew for a long time that measures can have text and not only numbers, but last week I had a scenario where it was the perfect solution for my problem.
Let&#8217;s say that I work in number of jobs. In every job I got some tasks that I need to do. The fact table looks [...]]]></description>
			<content:encoded><![CDATA[<p>I knew for a long time that measures can have text and not only numbers, but last week I had a scenario where it was the perfect solution for my problem.</p>
<p>Let&#8217;s say that I work in number of jobs. In every job I got some tasks that I need to do. The fact table looks like this:</p>
<table border="0" cellspacing="0" cellpadding="0" width="425">
<col span="1" width="99"></col>
<col span="1" width="118"></col>
<col span="1" width="99"></col>
<col span="1" width="109"></col>
<tbody>
<tr>
<td width="99" height="17">
<p align="center"><strong><em><span style="text-decoration: underline">Job</span></em></strong></p>
</td>
<td width="118">
<p align="center"><strong><em><span style="text-decoration: underline">Task</span></em></strong></p>
</td>
<td width="99">
<p align="center"><strong><em><span style="text-decoration: underline">Tasks To Do</span></em></strong></p>
</td>
<td width="109">
<p align="center"><strong><em><span style="text-decoration: underline">Tasks Completed</span></em></strong></p>
</td>
</tr>
<tr>
<td height="17">
<p align="center">Developer</p>
</td>
<td>
<p align="center">Develop BI System</p>
</td>
<td>
<p align="center">1</p>
</td>
<td>
<p align="center">1</p>
</td>
</tr>
<tr>
<td height="17">
<p align="center">Developer</p>
</td>
<td>
<p align="center">Help Friends</p>
</td>
<td>
<p align="center">1</p>
</td>
<td>
<p align="center">0</p>
</td>
</tr>
<tr>
<td height="17">
<p align="center">Manager</p>
</td>
<td>
<p align="center">Manage</p>
</td>
<td>
<p align="center">1</p>
</td>
<td>
<p align="center">1</p>
</td>
</tr>
<tr>
<td height="17">
<p align="center">Therapist</p>
</td>
<td>
<p align="center"> </p>
</td>
<td>
<p align="center">0</p>
</td>
<td>
<p align="center">0</p>
</td>
</tr>
</tbody>
</table>
<p>Summarizing the &#8220;Tasks To Do&#8221; column will get the total tasks that I need to do. Summarizing the &#8220;Tasks Completed&#8221; column will get the tasks that I did. Note that in the Therapist job I didn&#8217;t get any tasks.<br />
In the OLAP cube, I created a calculated measure which is the percent of the completed tasks (for every job or for any other dimension). The problem is: What is the answer in case that there are no any tasks to do? Some will say 0% and some will say 100%. That&#8217;s why a text measure such as &#8220;There are no tasks&#8221; can be a perfect solution for this kind of problem. This is the calculation of the calculated measure:</p>
<p><span id="more-361"></span><br />
Create Member CurrentCube.[Measures].[Completed Percentage] as<br />
IIF(IsEmpty([Measures].[Tasks To Do]),<br />
null,<br />
IIF([Measures].[Tasks To Do] = 0),<br />
-1,<br />
[Measures].[Completed Tasks] / [Measures].[Tasks To Do]<br />
)<br />
)<br />
,format_string = &#8220;#,##0%;\T\h\e\r\e\ \a\r\e\ \n\o\ \t\a\s\k\s;0%&#8221;;</p>
<p>In the Panorama&#8217;s view, the format of the measure must be &#8220;General&#8221;. Otherwise, the view won&#8217;t show the format string with the text</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow" target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2010%2F03%2Ftext-in-measures%2F" title="Technorati"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2010%2F03%2Ftext-in-measures%2F&amp;title=Text%20in%20Measures&amp;notes=I%20knew%20for%20a%20long%20time%20that%20measures%20can%20have%20text%20and%20not%20only%20numbers%2C%20but%20last%20week%20I%20had%20a%20scenario%20where%20it%20was%20the%20perfect%20solution%20for%20my%20problem.%0D%0A%0D%0ALet%27s%20say%20that%20I%20work%20in%20number%20of%20jobs.%20In%20every%20job%20I%20got%20some%20tasks%20that%20I%20need%20to%20do.%20The" title="del.icio.us"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2010%2F03%2Ftext-in-measures%2F&amp;title=Text%20in%20Measures&amp;bodytext=I%20knew%20for%20a%20long%20time%20that%20measures%20can%20have%20text%20and%20not%20only%20numbers%2C%20but%20last%20week%20I%20had%20a%20scenario%20where%20it%20was%20the%20perfect%20solution%20for%20my%20problem.%0D%0A%0D%0ALet%27s%20say%20that%20I%20work%20in%20number%20of%20jobs.%20In%20every%20job%20I%20got%20some%20tasks%20that%20I%20need%20to%20do.%20The" title="Digg"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://twitter.com/home/?status=tip%20@Techmeme%20http%3A%2F%2Fwww.panorama.com%2Fblog%2F2010%2F03%2Ftext-in-measures%2F%20Text%20in%20Measures" title="Suggest to Techmeme via Twitter"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/techmeme.png" title="Suggest to Techmeme via Twitter" alt="Suggest to Techmeme via Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2010%2F03%2Ftext-in-measures%2F&amp;t=Text%20in%20Measures" title="Facebook"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.blogospherenews.com/submit.php?url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2010%2F03%2Ftext-in-measures%2F&amp;title=Text%20in%20Measures" title="Blogosphere News"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/blogospherenews.png" title="Blogosphere News" alt="Blogosphere News" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2010%2F03%2Ftext-in-measures%2F&amp;title=Text%20in%20Measures&amp;annotation=I%20knew%20for%20a%20long%20time%20that%20measures%20can%20have%20text%20and%20not%20only%20numbers%2C%20but%20last%20week%20I%20had%20a%20scenario%20where%20it%20was%20the%20perfect%20solution%20for%20my%20problem.%0D%0A%0D%0ALet%27s%20say%20that%20I%20work%20in%20number%20of%20jobs.%20In%20every%20job%20I%20got%20some%20tasks%20that%20I%20need%20to%20do.%20The" title="Google Bookmarks"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2010%2F03%2Ftext-in-measures%2F&amp;title=Text%20in%20Measures&amp;source=Panorama+Business+Intelligence+Making+businesses+better+-+not+just+better+informed&amp;summary=I%20knew%20for%20a%20long%20time%20that%20measures%20can%20have%20text%20and%20not%20only%20numbers%2C%20but%20last%20week%20I%20had%20a%20scenario%20where%20it%20was%20the%20perfect%20solution%20for%20my%20problem.%0D%0A%0D%0ALet%27s%20say%20that%20I%20work%20in%20number%20of%20jobs.%20In%20every%20job%20I%20got%20some%20tasks%20that%20I%20need%20to%20do.%20The" title="LinkedIn"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow" target="_blank" href="http://www.friendfeed.com/share?title=Text%20in%20Measures&amp;link=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2010%2F03%2Ftext-in-measures%2F" title="FriendFeed"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.panorama.com/blog/2010/03/text-in-measures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MDX notes</title>
		<link>http://www.panorama.com/blog/2007/08/mdx-notes/</link>
		<comments>http://www.panorama.com/blog/2007/08/mdx-notes/#comments</comments>
		<pubDate>Wed, 01 Aug 2007 17:16:16 +0000</pubDate>
		<dc:creator>Miky Schreiber</dc:creator>
				<category><![CDATA[MDX]]></category>

		<guid isPermaLink="false">http://www.panorama.com/blog/?p=73</guid>
		<description><![CDATA[One of the beautiful features of Panorama NovaView is the ability to manually edit the MDX which expressing the view. In the NovaView desktop application, click on Tools -&#62; Direct MDX. The only problem is that you have to learn MDX yourself&#8230;
Here are some useful tips when learning MDX. Even experienced MDX programmers may find [...]]]></description>
			<content:encoded><![CDATA[<p>One of the beautiful features of Panorama NovaView is the ability to manually edit the MDX which expressing the view. In the NovaView desktop application, click on Tools -&gt; Direct MDX. The only problem is that you have to learn MDX yourself&#8230;</p>
<p>Here are some useful tips when learning MDX. Even experienced MDX programmers may find interest in these:</p>
<ul>
<li>If you were a code programmer in your past, you can relax: MDX don&#8217;t care about capitalization.</li>
<li>Don&#8217;t even try to skip an axis: It&#8217;s impossible and it is meaningless. Use the predefined names for the axis, such as: columns, rows, pages, etc.</li>
<li>You&#8217;re new to MDX and the whole OLAP gives you a headache? Try to imagine this as a <a href="http://en.wikipedia.org/wiki/Hypercube">hypercube</a>. It can help you a lot.</li>
<li>When writing large queries, pay attention to the &#8220;readability&#8221; of your MDX. Use the Monospace fonts whenever possible.</li>
<li>Do NOT think of SQL when learning or working with MDX. Although the syntaxes may look alike, these languages are totally different when you get to know them.</li>
<li>.Members will give you all regular members. .AllMembers will also include calculated members.</li>
<li>An expression like [Time].Members won&#8217;t work if the Time dimension has multiple hierarchies.</li>
<li>The asterisk (*) can replace the CrossJoin function. It may improve readability of the code.</li>
<li>When using Order() function, you can specify a sorting criteria which is not shown in the result grid.</li>
</ul>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow" target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F08%2Fmdx-notes%2F" title="Technorati"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F08%2Fmdx-notes%2F&amp;title=MDX%20notes&amp;notes=One%20of%20the%20beautiful%20features%20of%20Panorama%20NovaView%20is%20the%20ability%20to%20manually%20edit%20the%20MDX%20which%20expressing%20the%20view.%20In%20the%20NovaView%20desktop%20application%2C%20click%20on%20Tools%20-%26gt%3B%20Direct%20MDX.%20The%20only%20problem%20is%20that%20you%20have%20to%20learn%20MDX%20yourself...%0D%0A%0D%0A" title="del.icio.us"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F08%2Fmdx-notes%2F&amp;title=MDX%20notes&amp;bodytext=One%20of%20the%20beautiful%20features%20of%20Panorama%20NovaView%20is%20the%20ability%20to%20manually%20edit%20the%20MDX%20which%20expressing%20the%20view.%20In%20the%20NovaView%20desktop%20application%2C%20click%20on%20Tools%20-%26gt%3B%20Direct%20MDX.%20The%20only%20problem%20is%20that%20you%20have%20to%20learn%20MDX%20yourself...%0D%0A%0D%0A" title="Digg"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://twitter.com/home/?status=tip%20@Techmeme%20http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F08%2Fmdx-notes%2F%20MDX%20notes" title="Suggest to Techmeme via Twitter"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/techmeme.png" title="Suggest to Techmeme via Twitter" alt="Suggest to Techmeme via Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F08%2Fmdx-notes%2F&amp;t=MDX%20notes" title="Facebook"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.blogospherenews.com/submit.php?url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F08%2Fmdx-notes%2F&amp;title=MDX%20notes" title="Blogosphere News"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/blogospherenews.png" title="Blogosphere News" alt="Blogosphere News" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F08%2Fmdx-notes%2F&amp;title=MDX%20notes&amp;annotation=One%20of%20the%20beautiful%20features%20of%20Panorama%20NovaView%20is%20the%20ability%20to%20manually%20edit%20the%20MDX%20which%20expressing%20the%20view.%20In%20the%20NovaView%20desktop%20application%2C%20click%20on%20Tools%20-%26gt%3B%20Direct%20MDX.%20The%20only%20problem%20is%20that%20you%20have%20to%20learn%20MDX%20yourself...%0D%0A%0D%0A" title="Google Bookmarks"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F08%2Fmdx-notes%2F&amp;title=MDX%20notes&amp;source=Panorama+Business+Intelligence+Making+businesses+better+-+not+just+better+informed&amp;summary=One%20of%20the%20beautiful%20features%20of%20Panorama%20NovaView%20is%20the%20ability%20to%20manually%20edit%20the%20MDX%20which%20expressing%20the%20view.%20In%20the%20NovaView%20desktop%20application%2C%20click%20on%20Tools%20-%26gt%3B%20Direct%20MDX.%20The%20only%20problem%20is%20that%20you%20have%20to%20learn%20MDX%20yourself...%0D%0A%0D%0A" title="LinkedIn"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow" target="_blank" href="http://www.friendfeed.com/share?title=MDX%20notes&amp;link=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F08%2Fmdx-notes%2F" title="FriendFeed"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.panorama.com/blog/2007/08/mdx-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Diving deep and the different dialects of MDX</title>
		<link>http://www.panorama.com/blog/2007/05/diving-deep-and-the-different-dialects-of-mdx/</link>
		<comments>http://www.panorama.com/blog/2007/05/diving-deep-and-the-different-dialects-of-mdx/#comments</comments>
		<pubDate>Fri, 25 May 2007 18:08:08 +0000</pubDate>
		<dc:creator>Oz Shal-Bar</dc:creator>
				<category><![CDATA[MDX]]></category>

		<guid isPermaLink="false">http://www.panorama.com/blog/?p=55</guid>
		<description><![CDATA[At Panorama we have a saying that &#8220;MDX is like chess â€“ knowing the rules doesn&#8217;t mean you know hoe to play&#8221;.
Don&#8217;t believe it? Okay, let&#8217;s play!
If you don&#8217;t know much about MDX, these are the rules of your game:

1. Your pawns are called &#8220;Members&#8221;. Each member has a name, e.g. [Harry Potter] (get used [...]]]></description>
			<content:encoded><![CDATA[<p>At Panorama we have a saying that &#8220;MDX is like chess â€“ knowing the rules doesn&#8217;t mean you know hoe to play&#8221;.</p>
<p>Don&#8217;t believe it? Okay, let&#8217;s play!</p>
<p>If you don&#8217;t know much about MDX, these are the rules of your game:</p>
<p><span id="more-55"></span></p>
<p>1. Your pawns are called &#8220;Members&#8221;. Each member has a name, e.g. [Harry Potter] (get used to the square brackets limiting names in MDX).<br />
a. Each member may also have a value depending on the current members on other dimensions. E.g. the value of [Harry Potter] from the &#8220;Customer&#8221; dimension might be &#8220;2&#8243;, indicating the two tooth pastes Harry bought, i.e. the current member of dimension &#8220;Product&#8221; is &#8220;Tooth Paste&#8221;, and the &#8220;Measure&#8221; is &#8220;Product Count&#8221; rather than &#8220;Money payed&#8221;.<br />
b. You may have a neutral member, called: [Measures].CurrentMember.</p>
<p>2. A group of members is called &#8220;Set&#8221;. Sets may have names, e.g. [Set A]. Sets may contain members or other sets, by wrapping them with curly brackets, using the following syntax: &#8220;{[Member1], [Member2], [Set1]}&#8221;. The empty set syntax is &#8220;{}&#8221;</p>
<p>3. You may generate a new set by iterating a set and performing operation on each of its members, using this syntax: &#8220;Generate ([Set], Operation ([Set].Current))&#8221;. E.g. if [Set] contains &#8220;{[USA], [Canada]}&#8221;, then &#8220;Generate ([Set], [Set].Current.Children)&#8221; will generate a new set with the states which are the children of each country, namely &#8220;{[California], [Washington], â€¦, [British Columbia], [Yukon], â€¦}&#8221;</p>
<p>4. Filter a set by a certain condition: &#8220;Filter ([Set], Condition)&#8221;. E.g. &#8220;Filter ([Customers], [Customers].Current &gt; 2)&#8221; will filter out [Harry Potter], as its value is &#8220;2&#8243;, and the filter leaves only customers whose value is larger than &#8220;2&#8243;.</p>
<p>5. Instant-If syntax: &#8220;Iif (Condition, True-Expression, False-Expression)&#8221; means that if condition is met, then True-Expression is returned, otherwise, False-Expression is returned. E.g. what would return: &#8220;Iif ([Harry Potter] = 2, 1, 0)&#8221;? That&#8217;s right, since [Harry Potter] has a value &#8220;2&#8243;, the condition is met, and &#8220;1&#8243; is returned, being the true-expression.</p>
<p>6. Use StrToSet(&#8221;â€¦&#8221;) to convert a string into a set. E.g. StrToSet(&#8221;{[M1]}&#8221;) will convert the string to a set with single member [M1].</p>
<p>Memorize these rules, as they will be erased from this blog within 5 secondsâ€¦</p>
<p>Just kiddingâ€¦ Now the challenge:<br />
You have one condition and 2 sets, [True Set] and [False Set]. You should return [True Set] if the condition is met, otherwise return [False Set].</p>
<p>Have a clueâ€¦? Recognize any rules with true/false expressions? â€¦ For example â€¦ rule #5â€¦?</p>
<p>Well, that&#8217;s easy, you say. You propose:<br />
&#8220;Iif (Condition, [True Set], [False Set])&#8221;</p>
<p>Good for you, it&#8217;s just that Instant-If shouldn&#8217;t return sets, only numbers, strings, or members.</p>
<p>Excuse me? You tried it and it worked?</p>
<p>You tried it on Yukon, right? Yukon (apart from being a territory in Canada), is the nickname of Microsoft Analysis Services (AS) 2005. However, it won&#8217;t work on the older version, AS 2000.</p>
<p>Any solutionâ€¦? Like bypass the Instant-If/set situation by some conversionâ€¦? As mentioned in rule â€¦ #6?</p>
<p>Huray! You propose using StrToSet(â€¦). But howâ€¦?</p>
<p>That&#8217;s right: StrToSet ( Iif (Condition, &#8220;[True Set]&#8220;, &#8220;[False Set]&#8220;))<br />
The instant-if returns a string, and whatever string is returned, is immediately converted to a set.</p>
<p>That&#8217;s a jolly good answer, but still, there are MDX dialects which don&#8217;t support StrToSet, like SAP BW. Besides, what if the sets are huge? Conversion might be time &#038; memory consuming.</p>
<p>Any other ideasâ€¦? Other rules with conditionsâ€¦? Like â€¦ rule #4?</p>
<p>Great! You propose: Filter ([True Set], Condition)<br />
You claim that if the condition is met â€“ all members of [True Set] will pass the filter.</p>
<p>Alas, it&#8217;s very time consuming! Applying the condition on *all* members? Think of an improvement for the condition to be calculated only once (you&#8217;re in the right track, though).</p>
<p>Tough, huhâ€¦? Any rules you haven&#8217;t used â€¦? For example â€¦ rule #3?</p>
<p>Ok, you suggest using &#8220;Generate&#8221; (by elimination, huh?). But do you know how?</p>
<p>Suppose you use &#8220;Generate&#8221; to generate [True Set] all at once, but only if the condition is met.<br />
&#8220;Generate&#8221; is capable of generating [True Set] all at once, but it doesn&#8217;t do conditions. It iterates sets.</p>
<p>How can we benefit from that?</p>
<p>Let&#8217;s look at this phrase: Generate ([Set], [True Set])</p>
<p>This will generate [True Set] for each member in [Set]. So, if [Set] has only one member â€“ [True Set] will be generated once. If set is empty â€“ [True Set] won&#8217;t be generated.</p>
<p>Hey, this is exactly what we need. Can you smell the solution comingâ€¦?<br />
We should control the number of members in the set: 1 for generating [True Set], 0 otherwise â€“ depending on our condition. And what would be better for that purpose than our beloved â€¦ Filter?</p>
<p>Now we&#8217;re really close:<br />
Generate (Filter ([Set], Condition), [True Set])</p>
<p>We use Filter to control the number of members in [Set]: 1 member for generating [True Set]; 0 members for generating an empty set.</p>
<p>But what is this [Set]?</p>
<p>Okay, it should contain only one member, but we don&#8217;t really care which. In other words, it should be neutral.</p>
<p>Rings a bellâ€¦? Any forgotten sub-ruleâ€¦? Like &#8230; #1b?</p>
<p>Eureka! Using a set containing the neutral member { [Measures].CurrentMember }, The full answer is:<br />
Generate (Filter ( { [Measures].CurrentMember }, Condition), [True Set])</p>
<p>This will generate [True Set] only once, and only if condition is met.</p>
<p>And what about [False Set]?</p>
<p>Answer: Lest use the opposite condition &#8220;Not Condition&#8221;:<br />
Generate (Filter ( { [Measures].CurrentMember }, NOT Condition), [False Set])</p>
<p>Finally, how do we combine these 2 together?</p>
<p>Well, thatâ€™s easy: since both phrases generate sets (the first generates [True Set] or empty set, the second generates [False Set] or empty set);<br />
And since a set may contain other sets, let&#8217;s wrap them with curly brackets:</p>
<p>{<br />
Generate (Filter ( { [Measures].CurrentMember }, Condition), [True Set])<br />
,<br />
Generate (Filter ( { [Measures].CurrentMember }, NOT Condition), [False Set])<br />
}</p>
<p>Whenever condition is met â€“ [True Set] will be generated be the first phrase. Since the second phrase uses opposite condition â€“ it will necessarily not be met, and an empty set will be generated consequently, leaving only [True Set]. If the condition is not met â€“ only [False Set] will be generated, as you can figure.</p>
<p>Check Mate!!!</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow" target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F05%2Fdiving-deep-and-the-different-dialects-of-mdx%2F" title="Technorati"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F05%2Fdiving-deep-and-the-different-dialects-of-mdx%2F&amp;title=Diving%20deep%20and%20the%20different%20dialects%20of%20MDX&amp;notes=At%20Panorama%20we%20have%20a%20saying%20that%20%22MDX%20is%20like%20chess%20%C3%A2%E2%82%AC%E2%80%9C%20knowing%20the%20rules%20doesn%27t%20mean%20you%20know%20hoe%20to%20play%22.%0D%0A%0D%0ADon%27t%20believe%20it%3F%20Okay%2C%20let%27s%20play%21%0D%0A%0D%0AIf%20you%20don%27t%20know%20much%20about%20MDX%2C%20these%20are%20the%20rules%20of%20your%20game%3A%0D%0A%0D%0A%0D%0A%0D%0A1.%20Your%20pawns%20are" title="del.icio.us"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F05%2Fdiving-deep-and-the-different-dialects-of-mdx%2F&amp;title=Diving%20deep%20and%20the%20different%20dialects%20of%20MDX&amp;bodytext=At%20Panorama%20we%20have%20a%20saying%20that%20%22MDX%20is%20like%20chess%20%C3%A2%E2%82%AC%E2%80%9C%20knowing%20the%20rules%20doesn%27t%20mean%20you%20know%20hoe%20to%20play%22.%0D%0A%0D%0ADon%27t%20believe%20it%3F%20Okay%2C%20let%27s%20play%21%0D%0A%0D%0AIf%20you%20don%27t%20know%20much%20about%20MDX%2C%20these%20are%20the%20rules%20of%20your%20game%3A%0D%0A%0D%0A%0D%0A%0D%0A1.%20Your%20pawns%20are" title="Digg"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://twitter.com/home/?status=tip%20@Techmeme%20http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F05%2Fdiving-deep-and-the-different-dialects-of-mdx%2F%20Diving%20deep%20and%20the%20different%20dialects%20of%20MDX" title="Suggest to Techmeme via Twitter"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/techmeme.png" title="Suggest to Techmeme via Twitter" alt="Suggest to Techmeme via Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F05%2Fdiving-deep-and-the-different-dialects-of-mdx%2F&amp;t=Diving%20deep%20and%20the%20different%20dialects%20of%20MDX" title="Facebook"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.blogospherenews.com/submit.php?url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F05%2Fdiving-deep-and-the-different-dialects-of-mdx%2F&amp;title=Diving%20deep%20and%20the%20different%20dialects%20of%20MDX" title="Blogosphere News"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/blogospherenews.png" title="Blogosphere News" alt="Blogosphere News" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F05%2Fdiving-deep-and-the-different-dialects-of-mdx%2F&amp;title=Diving%20deep%20and%20the%20different%20dialects%20of%20MDX&amp;annotation=At%20Panorama%20we%20have%20a%20saying%20that%20%22MDX%20is%20like%20chess%20%C3%A2%E2%82%AC%E2%80%9C%20knowing%20the%20rules%20doesn%27t%20mean%20you%20know%20hoe%20to%20play%22.%0D%0A%0D%0ADon%27t%20believe%20it%3F%20Okay%2C%20let%27s%20play%21%0D%0A%0D%0AIf%20you%20don%27t%20know%20much%20about%20MDX%2C%20these%20are%20the%20rules%20of%20your%20game%3A%0D%0A%0D%0A%0D%0A%0D%0A1.%20Your%20pawns%20are" title="Google Bookmarks"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F05%2Fdiving-deep-and-the-different-dialects-of-mdx%2F&amp;title=Diving%20deep%20and%20the%20different%20dialects%20of%20MDX&amp;source=Panorama+Business+Intelligence+Making+businesses+better+-+not+just+better+informed&amp;summary=At%20Panorama%20we%20have%20a%20saying%20that%20%22MDX%20is%20like%20chess%20%C3%A2%E2%82%AC%E2%80%9C%20knowing%20the%20rules%20doesn%27t%20mean%20you%20know%20hoe%20to%20play%22.%0D%0A%0D%0ADon%27t%20believe%20it%3F%20Okay%2C%20let%27s%20play%21%0D%0A%0D%0AIf%20you%20don%27t%20know%20much%20about%20MDX%2C%20these%20are%20the%20rules%20of%20your%20game%3A%0D%0A%0D%0A%0D%0A%0D%0A1.%20Your%20pawns%20are" title="LinkedIn"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow" target="_blank" href="http://www.friendfeed.com/share?title=Diving%20deep%20and%20the%20different%20dialects%20of%20MDX&amp;link=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F05%2Fdiving-deep-and-the-different-dialects-of-mdx%2F" title="FriendFeed"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.panorama.com/blog/2007/05/diving-deep-and-the-different-dialects-of-mdx/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>MDX as a cross-platform OLAP query language</title>
		<link>http://www.panorama.com/blog/2007/04/mdx-as-a-cross-platform-olap-query-language/</link>
		<comments>http://www.panorama.com/blog/2007/04/mdx-as-a-cross-platform-olap-query-language/#comments</comments>
		<pubDate>Wed, 25 Apr 2007 18:50:30 +0000</pubDate>
		<dc:creator>Oz Shal-Bar</dc:creator>
				<category><![CDATA[MDX]]></category>

		<guid isPermaLink="false">http://www.panorama.com/blog/?p=44</guid>
		<description><![CDATA[It is well known that MDX is the standard language for querying OLAP serversâ€¦ Today MDX is become the de-facto standard for querying most OLAP servers, such as Microsoft Analysis-Services, SAP BW, Hyperion etc.
In that case you might probably think that supporting one OLAP platformâ€™s MDX means youâ€™ve covered them allâ€¦. Is that the case?
nope!

The [...]]]></description>
			<content:encoded><![CDATA[<p>It is well known that MDX is the standard language for querying OLAP serversâ€¦ Today MDX is become the de-facto standard for querying most OLAP servers, such as Microsoft Analysis-Services, SAP BW, Hyperion etc.</p>
<p>In that case you might probably think that supporting one OLAP platformâ€™s MDX means youâ€™ve covered them allâ€¦. Is that the case?</p>
<p>nope!</p>
<p><span id="more-44"></span></p>
<p>The main objective of standardization is to make this happen (supporting all OLAP providers with zero effort). However, each implementer of the standard might interpret the standard &#8220;slightly&#8221; different.</p>
<p>How much does &#8220;slightly&#8221; mean?</p>
<p>Let&#8217;s look at an example for such a &#8220;slight&#8221; difference between Microsoft and SAP BW as an example. Think about the &#8220;Filter&#8221; MDX function;</p>
<p>Suppose you&#8217;re analyzing the sales amount of year 1997 across the various states in the US, such as California (CA), Oregon (OR) and Washington (WA):</p>
<p>1997</p>
<p>&#8212;&#8212;</p>
<p>CA 70<br />
OR 40<br />
WA 20</p>
<p>Now, if you want to see only states which sold more than $30K. The MDX statement produced by your BI tool (such as Panorama NovaView) should be something like:</p>
<p>Filter (</p>
<p>{CA,OR,WA} ,</p>
<p>Year.1997 &gt; 30</p>
<p>)</p>
<p>The filter function accepts 2 arguments: the first is a set of members â€“ in our case the states, and the second is a numeric expression.</p>
<p>The filter iterates the members of the set, and check for each member if the numeric expression returns positive. If not â€“ the member is filtered out from the set.</p>
<p>In our case, filter iterates the states and leaves only states which sold more than 30 in 1997 (that leaves CA and OR in our case):</p>
<p>1997</p>
<p>&#8212;&#8212;</p>
<p>CA 70</p>
<p>OR 40</p>
<p>Now, suppose you want to see the same data, but divided to gender &#8211; Male (M) and Female (F):</p>
<p>1997</p>
<p>&#8212;&#8211;</p>
<p>M</p>
<p>CA 31</p>
<p>OR 17</p>
<p>WA 12</p>
<p>F</p>
<p>CA 29</p>
<p>OR 23</p>
<p>WA 8</p>
<p>Have you noticed that this is the same data? If you sum up M and F you&#8217;ll get the same results as before (e.g. for CA 31+29 = 50).</p>
<p>What if we apply the same filter we used before on this new table (or &#8220;cross-tab&#8221;, as we call it)?</p>
<p>We can easily see that the only number above 30 is CA in the context of Male (31). Let&#8217;s mark it as (M, CA) &#8211; which is called a &#8220;Tuple&#8221;.</p>
<p>Now, in the Microsoft world, if we used the same filter function we used before, we would get only this tuple â€“ (M, CA).</p>
<p>However, SAP BW has a &#8220;slightly&#8221; different interpretation of the &#8220;Filter&#8221; function:</p>
<p>It ignores context!</p>
<p>In other words: it&#8217;s not aware of the Male/Female we nested before our states, and calculates the filter condition according to the sales amount seen in the first table.</p>
<p>That means that we&#8217;ll see CA and OR in the context of both Male and Female â€“ so we&#8217;ll see many values lesser than 30, which we wanted to filter out.</p>
<p>SAP BW rationale states that if you want the filter condition to be calculated in the context of a certain &#8220;dimension&#8221; (in our case the gender dimension), you should explicitly add the dimension&#8217;s current-member to the condition:</p>
<p>Filter (</p>
<p>{CA,OR,WA} ,</p>
<p>(Year.1997, Gender.CurrentMember) &gt; 30</p>
<p>)</p>
<p>This will order BW to calculate the values of Male, then of Female, and produce correct results.</p>
<p>Ok â€“ you say â€“ but that&#8217;s not *that* complicated.</p>
<p>Maybe so, but that&#8217;s just one small example. The above solution works only for a small portion of the cases. In other cases you would use the &#8220;Sum&#8221; function in order to add a member to context, or replacing &#8220;Count of Filter&#8221; with &#8220;Sum of IIF&#8221; â€“ and other things you wouldn&#8217;t want to know about. Plus, you need a pretty â€œroughâ€ mechanism to even understand which dimensions are found in your context! You would go through all that effort just to overcome the &#8220;slight&#8221; difference of &#8220;Filter&#8221;â€¦.</p>
<p>And let me tell you something, this is just one tiny exampleâ€¦ there are many other functions and so many differencesâ€¦.</p>
<p>So this is my life, I learn and optimize our MDX support to be able to work across platforms. Hope to get some feedback on this note.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow" target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F04%2Fmdx-as-a-cross-platform-olap-query-language%2F" title="Technorati"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F04%2Fmdx-as-a-cross-platform-olap-query-language%2F&amp;title=MDX%20as%20a%20cross-platform%20OLAP%20query%20language&amp;notes=It%20is%20well%20known%20that%20MDX%20is%20the%20standard%20language%20for%20querying%20OLAP%20servers%C3%A2%E2%82%AC%C2%A6%20Today%20MDX%20is%20become%20the%20de-facto%20standard%20for%20querying%20most%20OLAP%20servers%2C%20such%20as%20Microsoft%20Analysis-Services%2C%20SAP%20BW%2C%20Hyperion%20etc.%0D%0A%0D%0AIn%20that%20case%20you%20might%20probabl" title="del.icio.us"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F04%2Fmdx-as-a-cross-platform-olap-query-language%2F&amp;title=MDX%20as%20a%20cross-platform%20OLAP%20query%20language&amp;bodytext=It%20is%20well%20known%20that%20MDX%20is%20the%20standard%20language%20for%20querying%20OLAP%20servers%C3%A2%E2%82%AC%C2%A6%20Today%20MDX%20is%20become%20the%20de-facto%20standard%20for%20querying%20most%20OLAP%20servers%2C%20such%20as%20Microsoft%20Analysis-Services%2C%20SAP%20BW%2C%20Hyperion%20etc.%0D%0A%0D%0AIn%20that%20case%20you%20might%20probabl" title="Digg"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://twitter.com/home/?status=tip%20@Techmeme%20http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F04%2Fmdx-as-a-cross-platform-olap-query-language%2F%20MDX%20as%20a%20cross-platform%20OLAP%20query%20language" title="Suggest to Techmeme via Twitter"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/techmeme.png" title="Suggest to Techmeme via Twitter" alt="Suggest to Techmeme via Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F04%2Fmdx-as-a-cross-platform-olap-query-language%2F&amp;t=MDX%20as%20a%20cross-platform%20OLAP%20query%20language" title="Facebook"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.blogospherenews.com/submit.php?url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F04%2Fmdx-as-a-cross-platform-olap-query-language%2F&amp;title=MDX%20as%20a%20cross-platform%20OLAP%20query%20language" title="Blogosphere News"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/blogospherenews.png" title="Blogosphere News" alt="Blogosphere News" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F04%2Fmdx-as-a-cross-platform-olap-query-language%2F&amp;title=MDX%20as%20a%20cross-platform%20OLAP%20query%20language&amp;annotation=It%20is%20well%20known%20that%20MDX%20is%20the%20standard%20language%20for%20querying%20OLAP%20servers%C3%A2%E2%82%AC%C2%A6%20Today%20MDX%20is%20become%20the%20de-facto%20standard%20for%20querying%20most%20OLAP%20servers%2C%20such%20as%20Microsoft%20Analysis-Services%2C%20SAP%20BW%2C%20Hyperion%20etc.%0D%0A%0D%0AIn%20that%20case%20you%20might%20probabl" title="Google Bookmarks"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F04%2Fmdx-as-a-cross-platform-olap-query-language%2F&amp;title=MDX%20as%20a%20cross-platform%20OLAP%20query%20language&amp;source=Panorama+Business+Intelligence+Making+businesses+better+-+not+just+better+informed&amp;summary=It%20is%20well%20known%20that%20MDX%20is%20the%20standard%20language%20for%20querying%20OLAP%20servers%C3%A2%E2%82%AC%C2%A6%20Today%20MDX%20is%20become%20the%20de-facto%20standard%20for%20querying%20most%20OLAP%20servers%2C%20such%20as%20Microsoft%20Analysis-Services%2C%20SAP%20BW%2C%20Hyperion%20etc.%0D%0A%0D%0AIn%20that%20case%20you%20might%20probabl" title="LinkedIn"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow" target="_blank" href="http://www.friendfeed.com/share?title=MDX%20as%20a%20cross-platform%20OLAP%20query%20language&amp;link=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F04%2Fmdx-as-a-cross-platform-olap-query-language%2F" title="FriendFeed"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.panorama.com/blog/2007/04/mdx-as-a-cross-platform-olap-query-language/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>MDX â€“ the magic behind BI</title>
		<link>http://www.panorama.com/blog/2007/01/the-power-of-mdx/</link>
		<comments>http://www.panorama.com/blog/2007/01/the-power-of-mdx/#comments</comments>
		<pubDate>Tue, 16 Jan 2007 16:55:03 +0000</pubDate>
		<dc:creator>Daniel Sitton</dc:creator>
				<category><![CDATA[MDX]]></category>

		<guid isPermaLink="false">http://www.primary.panorama.com/wordpress/?p=9</guid>
		<description><![CDATA[Panorama software has been in the driving seat of MDX since itâ€™s invention around the OLAP technology we sold to Microsoft back in 1996.
Since then weâ€™ve taken MDX to the extreme. As such I wanted to share some of the reasons why MDX has revolutionized the world of BIâ€¦. I hope you enjoy this entry [...]]]></description>
			<content:encoded><![CDATA[<p>Panorama software has been in the driving seat of MDX since itâ€™s invention around the OLAP technology we sold to Microsoft back in 1996.<br />
Since then weâ€™ve taken MDX to the extreme. As such I wanted to share some of the reasons why MDX has revolutionized the world of BIâ€¦. I hope you enjoy this entry and please provide your comments.</p>
<p>So the invention of MDX (Multi Dimensional Expressions) is really the key cornerstones in the world of BI especially since its establishmentÂ  as a standard query language for OLAP servers. MDX has three powerful concepts embedded in it. These concepts together are what make MDX unique and allow users to ask complex multi dimensions questions.</p>
<p><span id="more-9"></span></p>
<p>First and foremost is the ability to handle multiple dimensions simultaneously. Like in SQL, elements from Customers, Products and Time can be grouped together. The power of MDX is the ability to run complex expressions on each of the combinations, who are my top 5 Customers/Products/Periods? Who are the poorest? More power is reveled when a subtle change to the MDX is made and the entire expressions now refer to a different Geography, Reseller or Employee. MDX made BI exploration as powerful as it could get.</p>
<p>The second most important element of MDX is the hierarchy manipulations. As BI consumers we constantly move between analyzing highly aggregated values and drilling down to the focus areas. MDX is very good at both. It allows navigation inside big hierarchies with operations like Descendents and Ancestors. Most of the Set Theory operations like Union and Intersect are available and complex rules can be combined to assist users in navigation. An example is &#8220;please drill to the products that start with A till F and are manufactures in USA&#8221;.</p>
<p>As the semantic layer is becoming richer with metadata information, in many cases the analysis process combines fact table numbers with metadata. The ability to combine both is very powerful and in my opinion this is MDXâ€™s third important element. In SSAS 2005 this is referred to Dimension Attributes and Member Properties. In SAP world it is called Navigational and Display Attributes. No matter what the name is, in MDX it&#8217;s fairly the same and powerful combinations can be created. An example would be &#8220;Top 5 Customers for each product that is manufactured in the USA and weight over 5 kilos&#8221;.</p>
<p>As BI technologies evolve so is MDX. I feel that MDX is standing these days at a crossroad. Â Two of the main players that support MDX (Microsoft and SAP) are pushing it to different directions. Each company is interpreting the specification so to minimize its disadvantages, and is adding new sections to show its strength. In any case it would be interesting to see what will MDX next &#8220;most powerful&#8221; concepts.<br />
We often say though that MDX is just like chess, knowing the rules doesnâ€™t really mean you know how to playâ€¦.. we made the concept of mastering MDX an art, we invite you to download our product and see how far MDX can be taken.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow" target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F01%2Fthe-power-of-mdx%2F" title="Technorati"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F01%2Fthe-power-of-mdx%2F&amp;title=MDX%20%C3%A2%E2%82%AC%E2%80%9C%20the%20magic%20behind%20BI&amp;notes=Panorama%20software%20has%20been%20in%20the%20driving%20seat%20of%20MDX%20since%20it%C3%A2%E2%82%AC%E2%84%A2s%20invention%20around%20the%20OLAP%20technology%20we%20sold%20to%20Microsoft%20back%20in%201996.%0D%0ASince%20then%20we%C3%A2%E2%82%AC%E2%84%A2ve%20taken%20MDX%20to%20the%20extreme.%20As%20such%20I%20wanted%20to%20share%20some%20of%20the%20reasons%20why%20MDX%20h" title="del.icio.us"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F01%2Fthe-power-of-mdx%2F&amp;title=MDX%20%C3%A2%E2%82%AC%E2%80%9C%20the%20magic%20behind%20BI&amp;bodytext=Panorama%20software%20has%20been%20in%20the%20driving%20seat%20of%20MDX%20since%20it%C3%A2%E2%82%AC%E2%84%A2s%20invention%20around%20the%20OLAP%20technology%20we%20sold%20to%20Microsoft%20back%20in%201996.%0D%0ASince%20then%20we%C3%A2%E2%82%AC%E2%84%A2ve%20taken%20MDX%20to%20the%20extreme.%20As%20such%20I%20wanted%20to%20share%20some%20of%20the%20reasons%20why%20MDX%20h" title="Digg"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://twitter.com/home/?status=tip%20@Techmeme%20http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F01%2Fthe-power-of-mdx%2F%20MDX%20%C3%A2%E2%82%AC%E2%80%9C%20the%20magic%20behind%20BI" title="Suggest to Techmeme via Twitter"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/techmeme.png" title="Suggest to Techmeme via Twitter" alt="Suggest to Techmeme via Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F01%2Fthe-power-of-mdx%2F&amp;t=MDX%20%C3%A2%E2%82%AC%E2%80%9C%20the%20magic%20behind%20BI" title="Facebook"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.blogospherenews.com/submit.php?url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F01%2Fthe-power-of-mdx%2F&amp;title=MDX%20%C3%A2%E2%82%AC%E2%80%9C%20the%20magic%20behind%20BI" title="Blogosphere News"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/blogospherenews.png" title="Blogosphere News" alt="Blogosphere News" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F01%2Fthe-power-of-mdx%2F&amp;title=MDX%20%C3%A2%E2%82%AC%E2%80%9C%20the%20magic%20behind%20BI&amp;annotation=Panorama%20software%20has%20been%20in%20the%20driving%20seat%20of%20MDX%20since%20it%C3%A2%E2%82%AC%E2%84%A2s%20invention%20around%20the%20OLAP%20technology%20we%20sold%20to%20Microsoft%20back%20in%201996.%0D%0ASince%20then%20we%C3%A2%E2%82%AC%E2%84%A2ve%20taken%20MDX%20to%20the%20extreme.%20As%20such%20I%20wanted%20to%20share%20some%20of%20the%20reasons%20why%20MDX%20h" title="Google Bookmarks"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F01%2Fthe-power-of-mdx%2F&amp;title=MDX%20%C3%A2%E2%82%AC%E2%80%9C%20the%20magic%20behind%20BI&amp;source=Panorama+Business+Intelligence+Making+businesses+better+-+not+just+better+informed&amp;summary=Panorama%20software%20has%20been%20in%20the%20driving%20seat%20of%20MDX%20since%20it%C3%A2%E2%82%AC%E2%84%A2s%20invention%20around%20the%20OLAP%20technology%20we%20sold%20to%20Microsoft%20back%20in%201996.%0D%0ASince%20then%20we%C3%A2%E2%82%AC%E2%84%A2ve%20taken%20MDX%20to%20the%20extreme.%20As%20such%20I%20wanted%20to%20share%20some%20of%20the%20reasons%20why%20MDX%20h" title="LinkedIn"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow" target="_blank" href="http://www.friendfeed.com/share?title=MDX%20%C3%A2%E2%82%AC%E2%80%9C%20the%20magic%20behind%20BI&amp;link=http%3A%2F%2Fwww.panorama.com%2Fblog%2F2007%2F01%2Fthe-power-of-mdx%2F" title="FriendFeed"><img src="http://www.panorama.com/blog/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.panorama.com/blog/2007/01/the-power-of-mdx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

