<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" version="2.0">
  <channel>
    <title>Miky Schreiber's Blog - BI|SQL Server 2008|Analysis Services</title>
    <link>http://www.miky-schreiber.com/Blog/</link>
    <description>Business Intelligence, Analysis Services, MDX, DataWarehousing and more...</description>
    <language>en-us</language>
    <copyright>Miky Schreiber</copyright>
    <lastBuildDate>Tue, 22 Jun 2010 12:17:34 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.9.6264.0</generator>
    <managingEditor>miky@zahav.net.il</managingEditor>
    <webMaster>miky@zahav.net.il</webMaster>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=6537c330-ca32-4855-9313-e798a37981ec</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,6537c330-ca32-4855-9313-e798a37981ec.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,6537c330-ca32-4855-9313-e798a37981ec.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=6537c330-ca32-4855-9313-e798a37981ec</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <em>This is the third post about <a href="http://blogs.microsoft.co.il/blogs/itaybraun/">Itay
Braun</a></em>
          <em>'s seminar in the SQL &amp; BI conference. In this post, I'll write
some notes I collected from the second part of the seminar which discussed SSAS design,
but here I'll focus on near real-time cubes. I decided to write an independent post
about near real-time cubes because this subject deserves its own place. By the
way, I personally think that this subject is very interesting.</em>
        </p>
        <p>
There are several solutions to implement near real-time cubes:
</p>
        <ol>
          <li>
Processing only the last partition. Pros: Trivial and simple. Cons: Might impact users
in terms of resources and cache.</li>
          <li>
Small real-time cube. Pros: Simple and elegant solution. Cons: It's small,
so it can't contain much data even if you need to. This is the main reason why people
usually don't do it.</li>
          <li>
Backend processing server. Now it's getting interesting. The backend server is only
used for processing. The front-end server(s) is used for querying. Pros: Good performance
on query time. Cons: You need to take care of syncing the cubes, using XMLA sync,
physical file sync (SAN snapshots) or any other technology. The cache is deleted
with every sync.</li>
          <li>
Flip-Flop. It's like the previous solution, only here we switch between the servers.
Pros: It enables you to check your data/cube before making the switch. Good performance
on query time. Cons: You need to take care of changing the connection string in the
client side or implement NLB solution. It might disconnect users or you need to take
care of waiting for the end of the session and only then change the connection string.</li>
          <li>
ROLAP partition. Pros: No processing at all! Cons: Bad, bad performance.</li>
        </ol>
        <p>
If anyone have implemented one of these I'll be happy to hear.
</p>
        <img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=6537c330-ca32-4855-9313-e798a37981ec" />
      </body>
      <title>Notes from the SQL &amp; BI conference - Near Real-Time Cubes</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,6537c330-ca32-4855-9313-e798a37981ec.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,6537c330-ca32-4855-9313-e798a37981ec.aspx</link>
      <pubDate>Tue, 22 Jun 2010 12:17:34 GMT</pubDate>
      <description>&lt;p&gt;
&lt;em&gt;This is the&amp;nbsp;third post about &lt;a href="http://blogs.microsoft.co.il/blogs/itaybraun/"&gt;Itay
Braun&lt;/a&gt;&lt;/em&gt;&lt;em&gt;'s seminar in the SQL &amp;amp; BI conference. In this post, I'll write
some notes I collected from the second part of the seminar which discussed SSAS design,
but here I'll focus on near real-time cubes. I decided to write an independent&amp;nbsp;post
about&amp;nbsp;near real-time cubes because this subject deserves its own place. By the
way, I personally think that this subject is very interesting.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
There are several solutions to implement near real-time cubes:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Processing only the last partition. Pros: Trivial and simple. Cons: Might impact users
in terms of resources and cache.&lt;/li&gt;
&lt;li&gt;
Small real-time cube. Pros:&amp;nbsp;Simple and elegant solution.&amp;nbsp;Cons: It's small,
so it can't contain much data even if you need to. This is the main reason why people
usually don't do it.&lt;/li&gt;
&lt;li&gt;
Backend processing server. Now it's getting interesting. The backend server is only
used for processing. The front-end server(s) is used for querying. Pros: Good performance
on query time. Cons: You need to take care of syncing the cubes, using XMLA sync,
physical file sync (SAN snapshots)&amp;nbsp;or any other technology. The cache is deleted
with every sync.&lt;/li&gt;
&lt;li&gt;
Flip-Flop. It's like the previous solution, only here we switch between the servers.
Pros: It enables you to check your data/cube before making the switch. Good performance
on query time. Cons: You need to take care of changing the connection string in the
client side or implement NLB solution. It might disconnect users or you need to take
care of waiting for the end of the session and only then change the connection string.&lt;/li&gt;
&lt;li&gt;
ROLAP partition. Pros: No processing at all! Cons: Bad, bad&amp;nbsp;performance.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
If anyone have implemented one of these I'll be happy to hear.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=6537c330-ca32-4855-9313-e798a37981ec" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,6537c330-ca32-4855-9313-e798a37981ec.aspx</comments>
      <category>BI;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services;BI/SQL Server 2008;BI/SQL Server 2008/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=de92bdd9-8397-40b5-a969-035a17897699</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,de92bdd9-8397-40b5-a969-035a17897699.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,de92bdd9-8397-40b5-a969-035a17897699.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=de92bdd9-8397-40b5-a969-035a17897699</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This is the second post about <a href="http://blogs.microsoft.co.il/blogs/itaybraun/">Itay
Braun</a>'s seminar in the SQL &amp; BI conference. In this post, I'll write some
notes I collected from the second part of the seminar which discussed SSAS design.
</p>
        <ul>
          <li>
There's a very common misunderstanding about what is an entity. You can see it
when there are a lot of dimensions. If there are "car color", "car manufacturer"
and "car creation year" dimensions it seems you've got a problem. If there are dimensions
with only key and description attributes (or worse - only one description attribute)
then you've got a serious problem. 
</li>
          <li>
Design to Scale: Often the performance problem are caused by the dimensions and
not by the fact/cubes. 
</li>
          <li>
Don't develop SSAS with hebrew (or any other right-to-left language). Use hebrew only
in translations .I've personally got hurt with this. Maintaining MDX with hebrew is
hell. 
</li>
          <li>
Avoid using linked measures. If you have some, consider joining the cubes to one cube. 
</li>
          <li>
There need to be a balance between the amount of the dimensions and the amount of
the cubes. If they are equal, you've got a problem. BIDS will warn you (in the 2008
version) if you have two measure groups with the same dimensionality. 
</li>
          <li>
Keep the dimension keys as narrow as possible. Dimension keys based on more than one
column is not optimal. Use member properties, such as AttributeHierarchyEnabled, AttributeHierarchyOptimized
and GroupingBehaviour. 
</li>
          <li>
Data types is an issue in SSAS. Make sure the data types in the DSV are the same as
in the dimension attributes. 
</li>
          <li>
The SSAS engine works best when the foreign key between the fact and the dimension
is based on integer columns. Read more about dimension design <a href="http://sqlcat.com/whitepapers/archive/2009/02/15/the-analysis-services-2008-performance-guide.aspx">here</a>. 
</li>
          <li>
Attribute relationships and flexible vs. rigid are critical to performance.
As I read more and more about SSAS I understand how much it's crucial to performance. 
</li>
          <li>
Automatic creation of partitions can be a good solution for a wide variety of problems.
Note that when deploying your SSAS solution to the server you might override the partitions
you created with your code. To solve this, you can use the deployment wizard or to <a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,b8dcb74f-14df-4240-b5be-40c916b301f5.aspx">import
your SSAS database into solution</a>. 
</li>
          <li>
Each partition should have up to 50M records or up to 250MB. Optimize the partition
query. It's only plain SQL query. Get help from your DBA and get a better performance. 
</li>
          <li>
99% Aggregations will not cover 99% of the aggregation possibilities/combinations.
The engine chooses statistically-randomly which aggregation to save. Use the usage
based wizard. 
</li>
          <li>
Most of the processing time is the time required for the relational DB to return the
results of the SQL query. As before, get help from the DBA, improve this query (note
that you can't change it) and get a shorter processing time. 
</li>
          <li>
To solve MDX performance issues, you need to learn what is the difference between
the formula engine and the storage engine. I was suprised to see that many SSAS developers
never heard of it. 
</li>
          <li>
In MDX Scripts, use scoping instead of conditional calculations when possible. 
</li>
          <li>
Avoid StrToMember or StrToSet functions.</li>
        </ul>
        <img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=de92bdd9-8397-40b5-a969-035a17897699" />
      </body>
      <title>Notes from the SQL &amp; BI conference - SSAS Design</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,de92bdd9-8397-40b5-a969-035a17897699.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,de92bdd9-8397-40b5-a969-035a17897699.aspx</link>
      <pubDate>Mon, 14 Jun 2010 11:34:43 GMT</pubDate>
      <description>&lt;p&gt;
This is the second post about &lt;a href="http://blogs.microsoft.co.il/blogs/itaybraun/"&gt;Itay
Braun&lt;/a&gt;'s seminar in the SQL &amp;amp; BI conference. In this post, I'll write some
notes I collected from the second part of the seminar which discussed SSAS design.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
There's a&amp;nbsp;very common misunderstanding about what is an entity. You can see it
when there are a lot of dimensions. If there&amp;nbsp;are "car color", "car manufacturer"
and "car creation year" dimensions it seems you've got a problem. If there are dimensions
with only key and description attributes (or worse - only one description attribute)
then you've got a serious problem. 
&lt;li&gt;
Design to Scale: Often the performance problem are caused by the dimensions&amp;nbsp;and
not&amp;nbsp;by the fact/cubes. 
&lt;li&gt;
Don't develop SSAS with hebrew (or any other right-to-left language). Use hebrew only
in translations .I've personally got hurt with this. Maintaining MDX with hebrew is
hell. 
&lt;li&gt;
Avoid using linked measures. If you have some, consider joining the cubes to one cube. 
&lt;li&gt;
There need to be a balance between the amount of the dimensions and the amount of
the cubes. If they are equal, you've got a problem. BIDS will warn you (in the 2008
version) if you have two measure groups with the same dimensionality. 
&lt;li&gt;
Keep the dimension keys as narrow as possible. Dimension keys based on more than one
column is not optimal. Use member properties, such as AttributeHierarchyEnabled, AttributeHierarchyOptimized
and GroupingBehaviour. 
&lt;li&gt;
Data types is an issue in SSAS. Make sure the data types in the DSV are the same as
in the dimension attributes. 
&lt;li&gt;
The SSAS engine works best when the foreign key between the fact and the dimension
is based on integer columns. Read more about dimension design &lt;a href="http://sqlcat.com/whitepapers/archive/2009/02/15/the-analysis-services-2008-performance-guide.aspx"&gt;here&lt;/a&gt;. 
&lt;li&gt;
Attribute relationships and&amp;nbsp;flexible vs. rigid&amp;nbsp;are critical to performance.
As I read more and more about SSAS I understand how much it's crucial to performance. 
&lt;li&gt;
Automatic creation of partitions can be a good solution for a wide variety of problems.
Note that when deploying your SSAS solution to the server you might override the partitions
you created with your code. To solve this, you can use the deployment wizard or to &lt;a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,b8dcb74f-14df-4240-b5be-40c916b301f5.aspx"&gt;import
your SSAS database into solution&lt;/a&gt;. 
&lt;li&gt;
Each partition should have up to 50M records or up to 250MB. Optimize the partition
query. It's only plain SQL query. Get help from your DBA and get a better performance. 
&lt;li&gt;
99% Aggregations will not cover 99% of the aggregation possibilities/combinations.
The engine chooses statistically-randomly which aggregation to save. Use the usage
based wizard. 
&lt;li&gt;
Most of the processing time is the time required for the relational DB to return the
results of the SQL query. As before, get help from the DBA, improve this query (note
that you can't change it) and get a shorter processing time. 
&lt;li&gt;
To solve MDX performance issues, you need to learn what is the difference between
the formula engine and the storage engine. I was suprised to see that many SSAS developers
never heard of it. 
&lt;li&gt;
In MDX Scripts, use scoping instead of conditional calculations when possible. 
&lt;li&gt;
Avoid StrToMember or StrToSet functions.&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=de92bdd9-8397-40b5-a969-035a17897699" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,de92bdd9-8397-40b5-a969-035a17897699.aspx</comments>
      <category>BI;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services;BI/SQL Server 2008;BI/SQL Server 2008/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=6c28fd76-8c34-4ef0-8a42-ba2f267df8d3</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,6c28fd76-8c34-4ef0-8a42-ba2f267df8d3.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,6c28fd76-8c34-4ef0-8a42-ba2f267df8d3.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=6c28fd76-8c34-4ef0-8a42-ba2f267df8d3</wfw:commentRss>
      <title>History Browsing in OLAP and LastNonEmptyLeaf</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,6c28fd76-8c34-4ef0-8a42-ba2f267df8d3.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,6c28fd76-8c34-4ef0-8a42-ba2f267df8d3.aspx</link>
      <pubDate>Wed, 03 Mar 2010 12:34:48 GMT</pubDate>
      <description>&lt;img style="MARGIN: 0px 1em 1em" height="50%" src="http://www.miky-schreiber.com/Blog/content/binary/time.jpg" width="25%" align=left&gt; One
of the basic requirements of a modern BI system or Data Warehouse is to be non-volatile,
meaning that the DWH will save the history. In this post I'll explain how to implement
it in the DWH while assuming that the history can be changed and (the more interesting
part) how to implement it in Analysis Services.&lt;br&gt;
&lt;p&gt;
Before starting with history saving in the DWH,&amp;nbsp;I need to say that this has nothing
to do with Slowly Changing Dimensions. You can work with Type 1, 2 or 3. All you need
to take care of is that the fact table will be consistent with the dimension tables.
Assuming that the history can change (this is&amp;nbsp;the scenario&amp;nbsp;in my organization),
we need to extract all the fact data every time. If you work with staging level/environment/layer
you can use it to calculate which records has been changed or&amp;nbsp;inserted&amp;nbsp;and
only upsert them&amp;nbsp;to the DWH itself (it's more secure). In our case, we'll work
without such staging level so we need to load all the fact data in every load to the
DWH.
&lt;/p&gt;
&lt;p&gt;
Loading&amp;nbsp;the fact&amp;nbsp;in the ETL is very simple - we'll&amp;nbsp;save the&amp;nbsp;datetime
of the execution start, round it&amp;nbsp;and put it in every&amp;nbsp;row in the fact table.
We can call this field&amp;nbsp;CreateTime. You probably ask yourself why we need to round
it. The answer is that we don't want the time dimension to have every possible value
of datetime. It's huge and the users don't need that kind of accuracy. That's why
I round it in my projects to half-hour, meaning that 14:27 becomes 14:00 and 14:50
becomes 14:30. Let's look at an example of such fact table:
&lt;/p&gt;
&lt;p&gt;
&lt;table style="WIDTH: 389pt; BORDER-COLLAPSE: collapse" cellspacing=0 cellpadding=0 width=518 border=0 x:str&gt;
&lt;colgroup&gt;
&lt;col style="WIDTH: 50pt; mso-width-source: userset; mso-: 2450" width=67&gt;
&lt;col style="WIDTH: 63pt; mso-width-source: userset; mso-: 3072" span=2 width=84&gt;
&lt;col style="WIDTH: 53pt; mso-width-source: userset; mso-: 2560" span=2 width=70&gt;
&lt;col style="WIDTH: 107pt; mso-width-source: userset; mso: 5229" width=143&gt;
&lt;tbody&gt;
&lt;tr style="HEIGHT: 12.75pt" height=17&gt;
&lt;td class=xl22 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 50pt; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-: transparent" width=67 height=17&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;&lt;strong&gt;&lt;em&gt;&lt;u&gt;RowNum&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl22 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext; WIDTH: 63pt; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" width=84&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;&lt;strong&gt;&lt;em&gt;&lt;u&gt;Dimension1&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt; 
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl22 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext; WIDTH: 63pt; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" width=84&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;&lt;strong&gt;&lt;em&gt;&lt;u&gt;Dimension2&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt; 
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl22 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext; WIDTH: 53pt; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" width=70&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;&lt;strong&gt;&lt;em&gt;&lt;u&gt;Measure1&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt; P&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl22 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext; WIDTH: 53pt; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" width=70&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;&lt;strong&gt;&lt;em&gt;&lt;u&gt;Measure2&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt; P&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl23 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext; WIDTH: 107pt; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" width=143&gt;
&lt;p align=center&gt;
&lt;strong&gt;&lt;em&gt;&lt;u&gt;&lt;font face=Arial color=#000000 size=2&gt;CreateTime&lt;/font&gt;&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="HEIGHT: 12.75pt" height=17&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17 x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;1&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;X&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;A&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;4&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;20&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;03/03/2010 15:00&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="HEIGHT: 12.75pt" height=17&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17 x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;2&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;X&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;B&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;56&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl26 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;strong&gt;&lt;font face=Arial color=#000000 size=2&gt;19&lt;/font&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;03/03/2010 15:00&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="HEIGHT: 12.75pt" height=17&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17 x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;3&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;Y&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;B&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;2&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;3&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;03/03/2010 15:00&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="HEIGHT: 12.75pt" height=17&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17 x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;4&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;Y&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;B&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl26 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;strong&gt;&lt;font face=Arial color=#000000 size=2&gt;1&lt;/font&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;10&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;03/03/2010 15:00&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="HEIGHT: 12.75pt" height=17&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17 x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;5&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;Y&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;C&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;7&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;5&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;03/03/2010 15:00&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="HEIGHT: 12.75pt" height=17&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17 x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;6&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;X&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;A&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;4&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;20&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;03/03/2010 15:30&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="HEIGHT: 12.75pt" height=17&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17 x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;7&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;X&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;B&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;56&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl26 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;strong&gt;&lt;font face=Arial color=#000000 size=2&gt;40&lt;/font&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;03/03/2010 15:30&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="HEIGHT: 12.75pt" height=17&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17 x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;8&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;Y&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;B&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;2&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;3&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;03/03/2010 15:30&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="HEIGHT: 12.75pt" height=17&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17 x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;9&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;Y&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;B&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl26 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;strong&gt;&lt;font face=Arial color=#000000 size=2&gt;10&lt;/font&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;10&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;03/03/2010 15:30&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="HEIGHT: 12.75pt" height=17&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17 x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;10&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;Y&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;C&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;7&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;5&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;03/03/2010 15:30&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;
&lt;p&gt;
Here we can see two executions of the ETL: The first between 15:00 and 15:00, the
second between 15:31 and 15:59. Note the differences in rows 2 vs. 7 and 4 vs. 9.
This means that the source table(s) has changed between the executions.
&lt;/p&gt;
&lt;p&gt;
In the DWH, we create foreign keys from Dimension1 and Dimension2 to their dimension
tables. We'll also create FK between CreateTime and the time dimension. I won't get
into the time dimension design here, you can read about it&amp;nbsp;a &lt;a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,73f9d050-05bd-4dc9-b719-ae9d256557b3.aspx"&gt;past
post&lt;/a&gt;. I assume that the time dimension has the hierarchy Year -&amp;gt; Month -&amp;gt;
Day -&amp;gt; Hour -&amp;gt; Half-Hour. It seems that now we have a good fact table for use
in Reporting Services (or any other reporting tool). Create a parameter called Extraction
Time/ETL Time and assign it values from distinct on CreateTime. The user can pick
a date and the report will filter on this date. Perfect.
&lt;/p&gt;
&lt;p&gt;
The problematic part starts in Analysis Services. &lt;strong&gt;Only one extraction time
can be the current member. There is no sense in summing or aggregating more than one
extraction time.&lt;/strong&gt; There are two ways to deal with it:
&lt;/p&gt;
&lt;u&gt;The wrong way&lt;/u&gt; - I'm writing&amp;nbsp;this down so you'll learn from this &lt;em&gt;design
mistake&lt;/em&gt;. We created a calculated member which takes the last extraction time: 
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Create Member CurrentCube.[Extraction Time]. [Calendar].[All].[Last Data Time]&lt;br&gt;
AS&lt;br&gt;
Tail ([Extraction Time].[Calendar].[HALF HOUR].Members,1).Item(0),&lt;br&gt;
Visible = 1; 
&lt;p&gt;
In every Panorama view, we sliced the Extraction time on the [Last Data Time] member,
which will show the user the data of the last ETL run. Our basic assumption was that
the user wants to see the current data and when he'll want to see the historical data
he will pick another member from the Extraction time dimension. This is the point
we missed and it soon&amp;nbsp; enough bumped into our face. 
&lt;p&gt;
We forgot that every system, even BI system which is built for analysts should be
intuitive and idiot-proof. The users picked members from the day level in the Extraction
time dimension. When we asked them why they did it they said that "we wanted to see
the data from 03/03/2010 and suddenly the numbers got bigger!". That happened, of
course, because the member 03/03/2010 is the sum of 03/03/2010 15:00 and 03/03/2010
15:30. The solution is that no matter which member the user picks in the Extraction
time dimension, he should see only one leaf (half-hour level) member at a time. This
takes us to 
&lt;p&gt;
&lt;u&gt;The right way&lt;/u&gt; - We set the [Last Data Time] member to be visible = 0 (I kept
it for debug purposes) and I written MDX script which I call NonLastEmptyLeaf. This
script makes sure that&amp;nbsp;no matter which member in the Extraction time hierarchy
will be picked, the user will be sliced only on the last non empty leaf. For example,
if the user picks 03/03/2010 he will see the data of 03/03/2010 15:30. This is what
will happen also when he'll slice on 03/2010, 2010 and even the [All] member. This
is the MDX script:&lt;br&gt;
&lt;br&gt;
Freeze([Extraction time].[Calendar].[All]);&lt;br&gt;
Scope(&lt;br&gt;
&amp;nbsp; Descendants (&lt;br&gt;
&amp;nbsp;&amp;nbsp; [Extraction time].[Calendar]. [All],&lt;br&gt;
&amp;nbsp;&amp;nbsp; 0,&lt;br&gt;
&amp;nbsp;&amp;nbsp; SELF_AND_AFTER&lt;br&gt;
&amp;nbsp; )&lt;br&gt;
);&lt;br&gt;
&amp;nbsp; this = Tail (&lt;br&gt;
&amp;nbsp;&amp;nbsp; Filter(&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Descendants(&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Extraction time]. [Calendar].CurrentMember,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Extraction time].[Calendar].[HALF HOUR],&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LEAVES&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [Measures].CurrentMember &amp;gt; 0&lt;br&gt;
&amp;nbsp;&amp;nbsp; ) 
&lt;br&gt;
&amp;nbsp; ).Item(0);&lt;br&gt;
End Scope;
&lt;/p&gt;
&lt;p&gt;
Now, there is no meaning of [Last Data Time] member because slicing on the [All] member
will show the current data, meaning that no slicing at all will show the current data
because [All] is the default member.
&lt;/p&gt;
&lt;p&gt;
To conclude,&amp;nbsp;history browsing can be dangerous if we let the users the option
to slice on more than one data time. The open question that I have is how can I prevent
the user from picking more than one member in this hierarchy in Panorama views? Should
I even try to do that or should I count on his minimal common sense?
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=6c28fd76-8c34-4ef0-8a42-ba2f267df8d3" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,6c28fd76-8c34-4ef0-8a42-ba2f267df8d3.aspx</comments>
      <category>BI;BI/DataWarehousing;BI/MDX;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services;BI/SQL Server 2008;BI/SQL Server 2008/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=51a6ed33-2855-4d28-af43-6af5d6c8ecd6</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,51a6ed33-2855-4d28-af43-6af5d6c8ecd6.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,51a6ed33-2855-4d28-af43-6af5d6c8ecd6.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=51a6ed33-2855-4d28-af43-6af5d6c8ecd6</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <title>Text in OLAP Measures</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,51a6ed33-2855-4d28-af43-6af5d6c8ecd6.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,51a6ed33-2855-4d28-af43-6af5d6c8ecd6.aspx</link>
      <pubDate>Sun, 14 Feb 2010 12:49:00 GMT</pubDate>
      <description>&lt;p&gt;
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.
&lt;/p&gt;
&lt;p&gt;
Let'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:
&lt;/p&gt;
&lt;p&gt;
&lt;table style="WIDTH: 319pt; BORDER-COLLAPSE: collapse" cellspacing=0 cellpadding=0 width=425 border=0 x:str&gt;
&lt;colgroup&gt;
&lt;col style="WIDTH: 74pt; mso-width-source: userset; mso-width-alt: 3620" width=99&gt;
&lt;col style="WIDTH: 89pt; mso-width-source: userset; mso-width-alt: 4315" width=118&gt;
&lt;col style="WIDTH: 74pt; mso-width-source: userset; mso-width-alt: 3620" width=99&gt;
&lt;col style="WIDTH: 82pt; mso-width-source: userset; mso-width-alt: 3986" width=109&gt;
&lt;tbody&gt;
&lt;tr style="HEIGHT: 12.75pt" height=17&gt;
&lt;td class=xl24 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 74pt; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=99 height=17&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;&lt;strong&gt;&lt;em&gt;&lt;u&gt;Job&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 89pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=118&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;&lt;strong&gt;&lt;em&gt;&lt;u&gt;Task&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 74pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=99&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;&lt;strong&gt;&lt;em&gt;&lt;u&gt;Tasks To Do&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl24 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 82pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=109&gt;
&lt;p align=center&gt;
&lt;strong&gt;&lt;em&gt;&lt;u&gt;&lt;font face=Arial color=#000000 size=2&gt;Tasks Completed&lt;/font&gt;&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="HEIGHT: 12.75pt" height=17&gt;
&lt;td class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;Developer&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;Develop BI System&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;1&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;1&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="HEIGHT: 12.75pt" height=17&gt;
&lt;td class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;Developer&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;Help Friends&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;1&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;0&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="HEIGHT: 12.75pt" height=17&gt;
&lt;td class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;Manager&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;Manage&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;1&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;1&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="HEIGHT: 12.75pt" height=17&gt;
&lt;td class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;Therapist&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent"&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;0&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" x:num&gt;
&lt;p align=center&gt;
&lt;font face=Arial color=#000000 size=2&gt;0&lt;/font&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;
&lt;p&gt;
Summarizing the "Tasks To Do" column will get the total tasks that I need to do. Summarizing
the "Tasks Completed" column will get the tasks that I did. Note that in the Therapist
job I didn't get any tasks.&lt;br&gt;
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&amp;nbsp;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's why a text measure such as "There are no tasks" can be a perfect solution
for this kind of problem. This is the calculation of the calculated measure:
&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;
Create Member CurrentCube.[Measures].[Completed Percentage] as&lt;br&gt;
IIF(IsEmpty([Measures].[Tasks To Do]),&lt;br&gt;
&amp;nbsp;&amp;nbsp;null,&lt;br&gt;
&amp;nbsp;&amp;nbsp;IIF([Measures].[Tasks To Do] = 0),&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'There are no tasks',&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[Measures].[Completed Tasks] / [Measures].[Tasks To Do]&lt;br&gt;
&amp;nbsp;&amp;nbsp;)&lt;br&gt;
)&lt;br&gt;
This scenario can happen in many cubes. Tell me if you have any other solution for
this kind of problem.
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;&lt;u&gt;Update:&lt;/u&gt;&lt;/em&gt; Read the important comments below.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=51a6ed33-2855-4d28-af43-6af5d6c8ecd6" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,51a6ed33-2855-4d28-af43-6af5d6c8ecd6.aspx</comments>
      <category>BI;BI/MDX;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services;BI/SQL Server 2008;BI/SQL Server 2008/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=cbc9ec2a-6745-411d-ba63-19561dc9f411</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,cbc9ec2a-6745-411d-ba63-19561dc9f411.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,cbc9ec2a-6745-411d-ba63-19561dc9f411.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=cbc9ec2a-6745-411d-ba63-19561dc9f411</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
There are some things you can only learn in the hard way. It didn't happenned
to me personally but to my team friends, so I consider it as it is my bad.
</p>
        <p>
We upgraded our ETL tool - Informatica, from version 8.5 to 8.6. We had to run
some tests to see that the results are the same. So, what we did is to save the result
table from 8.5 in Excel, save the result table from 8.6 in Excel and then compare
them using Excel-built-in functions. The only problem is we didn't pay attention to
the places where zero and null interchanged. This happened because the two versions
act differently where null values take places in aggregation functions. For example,
when there is a sum function and it aggregates only on null values. In one version
the output is zero and in the other the output is null... 
</p>
        <p>
This can also happen in other tools and technology. For example, in OLAP cubes the
difference between zero and null is the difference between seeing the member of the
dimension on the screen and not knowing of its existence.
</p>
        <p>
For conclusion, always be aware to this point and don't forget to check it.
</p>
        <img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=cbc9ec2a-6745-411d-ba63-19561dc9f411" />
      </body>
      <title>The Difference between null and zero</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,cbc9ec2a-6745-411d-ba63-19561dc9f411.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,cbc9ec2a-6745-411d-ba63-19561dc9f411.aspx</link>
      <pubDate>Sun, 22 Mar 2009 21:09:59 GMT</pubDate>
      <description>&lt;p&gt;
There are some things you can only learn&amp;nbsp;in&amp;nbsp;the hard way. It didn't happenned
to me personally but to my team friends, so I consider it as it is my bad.
&lt;/p&gt;
&lt;p&gt;
We upgraded our ETL tool&amp;nbsp;- Informatica, from version 8.5 to 8.6. We had to&amp;nbsp;run
some tests to see that the results are the same. So, what we did is to save the result
table from 8.5 in Excel, save the result table from 8.6 in Excel and then compare
them using Excel-built-in functions. The only problem is we didn't pay attention to
the places where zero and null interchanged. This happened because the two versions
act differently where null values take places in aggregation functions. For example,
when there is a sum function and it aggregates only on null values. In one version
the output is zero and in the other the output is null... 
&lt;/p&gt;
&lt;p&gt;
This can also happen in other tools and technology. For example, in OLAP cubes the
difference between zero and null is the difference between seeing the member of the
dimension on the screen and not knowing of its existence.
&lt;/p&gt;
&lt;p&gt;
For conclusion, always be aware to this point and don't forget to check it.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=cbc9ec2a-6745-411d-ba63-19561dc9f411" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,cbc9ec2a-6745-411d-ba63-19561dc9f411.aspx</comments>
      <category>BI;BI/DataWarehousing;BI/Informatica;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services;BI/SQL Server 2008;BI/SQL Server 2008/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=b8dcb74f-14df-4240-b5be-40c916b301f5</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,b8dcb74f-14df-4240-b5be-40c916b301f5.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,b8dcb74f-14df-4240-b5be-40c916b301f5.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=b8dcb74f-14df-4240-b5be-40c916b301f5</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Today I had a very disturbing coincidence.<br />
My friend Ariel worked on a SSAS solution with no version control (we're using VSS).
Instead of using that, he developed by opening the database on the server. I told
him that he must fix it and we must have a recent version-controlled solution.
In the past we asked Microsoft support how to do that (we lost all our vss files and
had only the databases). <strong>They simply said that it's not possible</strong>.
Ariel has found today that it can be made very easily using File -&gt; New Project
-&gt; Import Analysis Services Database, as you can see in the picture:
</p>
        <img src="http://www.miky-schreiber.com/Blog/content/binary/importSSASsolutionFromDB.JPG" border="0" />
        <img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=b8dcb74f-14df-4240-b5be-40c916b301f5" />
      </body>
      <title>Importing SSAS database to solution</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,b8dcb74f-14df-4240-b5be-40c916b301f5.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,b8dcb74f-14df-4240-b5be-40c916b301f5.aspx</link>
      <pubDate>Wed, 03 Dec 2008 20:09:58 GMT</pubDate>
      <description>&lt;p&gt;
Today I had a very disturbing coincidence.&lt;br&gt;
My friend Ariel worked on a SSAS solution with no version control (we're using VSS).
Instead of using that, he developed by opening the database on the server. I told
him that he must fix it and we must have a&amp;nbsp;recent version-controlled solution.
In the past we asked Microsoft support how to do that (we lost all our vss files and
had only the databases). &lt;strong&gt;They simply said that it's not possible&lt;/strong&gt;.
Ariel has found today that it can be made very easily using File -&amp;gt; New Project
-&amp;gt; Import Analysis Services Database, as you can see in the picture:
&lt;/p&gt;
&lt;img src="http://www.miky-schreiber.com/Blog/content/binary/importSSASsolutionFromDB.JPG" border=0&gt;&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=b8dcb74f-14df-4240-b5be-40c916b301f5" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,b8dcb74f-14df-4240-b5be-40c916b301f5.aspx</comments>
      <category>BI;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services;BI/SQL Server 2008;BI/SQL Server 2008/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=ee118b93-9ffa-4f4c-aaea-52700b6c6d3c</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,ee118b93-9ffa-4f4c-aaea-52700b6c6d3c.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,ee118b93-9ffa-4f4c-aaea-52700b6c6d3c.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=ee118b93-9ffa-4f4c-aaea-52700b6c6d3c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This is a little bit tricky. Unlike the AdomdClient assembly, the AdomdServer assembly 
doesn't have a descriptive name. It's called msmgdsrv.dll and it is located in Program
Files\Microsoft SQL Server\MSSQL.2\OLAP\bin. Why it's not documented anywhere?<br /></p>
        <img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=ee118b93-9ffa-4f4c-aaea-52700b6c6d3c" />
      </body>
      <title>Finding the AdomdServer assembly</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,ee118b93-9ffa-4f4c-aaea-52700b6c6d3c.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,ee118b93-9ffa-4f4c-aaea-52700b6c6d3c.aspx</link>
      <pubDate>Tue, 18 Nov 2008 14:17:16 GMT</pubDate>
      <description>&lt;p&gt;
This is a little bit tricky. Unlike the AdomdClient assembly, the AdomdServer assembly&amp;nbsp;
doesn't have a descriptive name. It's called msmgdsrv.dll and it is located in Program
Files\Microsoft SQL Server\MSSQL.2\OLAP\bin. Why it's not documented anywhere?&lt;br&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=ee118b93-9ffa-4f4c-aaea-52700b6c6d3c" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,ee118b93-9ffa-4f4c-aaea-52700b6c6d3c.aspx</comments>
      <category>BI;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services;BI/SQL Server 2008;BI/SQL Server 2008/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=5c9ebeb3-98d5-43ea-9f63-a0e18c3929bd</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,5c9ebeb3-98d5-43ea-9f63-a0e18c3929bd.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,5c9ebeb3-98d5-43ea-9f63-a0e18c3929bd.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=5c9ebeb3-98d5-43ea-9f63-a0e18c3929bd</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
After announcing the <a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,aca4f6ce-32bb-47ab-a453-5b23c25b3d48.aspx">MdxInjection
program</a> I got several requests for additional details and for the ability to run
it without using Visual Studio. So, here are some important points:
</p>
        <ul>
          <li>
When I published it I had developers in mind because I'm sure than anyone will want
to do his little modification before using it for his own needs. That's why I published
it as a solution and not as executable. 
</li>
          <li>
I written it down using VS2008 but only with the .Net 2 framework. Those of you who
uses VS2005 won't be able to open the solution. 
</li>
          <li>
The program has only one public method - InjectMdx, who takes two arguments: The location
of the CommonMdx file and the location of the xml configuration file. 
</li>
          <li>
The CommonMdx.mdx file contains the common MDX script. The relevant part has
to start with /* Common MDX */ and then the common mdx script. Anything written before
it won't be treated. That gives you the ability to save some data or comments for
yourself in this file. 
</li>
          <li>
Example of the configuration xml file can be found in the Test libary inside the solution.
Basically, it enable you to define in which servers, databases and cubes you want
to inject the common script. Pay attention that you have to write the connection strings
in this file. 
</li>
          <li>
Note that the program will detect cube dimensions with their name changed and will
know how to replace them. That means that if you mention the Time dimension in the
common script and inject it to AdventureWorks cube, the script will replace the string
"Time" with the "ShipmentDate" string, for example.</li>
        </ul>
        <p>
For those of you who want simple execution file, I added a windows console project
in the solution.
</p>
        <a href="http://www.miky-schreiber.com/blog/content/binary/MdxInjectionConsoleApp.zip">Link
to only executable program</a>
        <br />
        <a href="http://www.miky-schreiber.com/blog/content/binary/MdxInjection2.zip">Link
to the solution with the added windows application project</a>
        <br />
        <a href="http://www.miky-schreiber.com/blog/content/binary/MdxInjection.zip">Link
to the solution without the windows application project</a>
        <img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=5c9ebeb3-98d5-43ea-9f63-a0e18c3929bd" />
      </body>
      <title>The MdxInjection Program - continued</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,5c9ebeb3-98d5-43ea-9f63-a0e18c3929bd.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,5c9ebeb3-98d5-43ea-9f63-a0e18c3929bd.aspx</link>
      <pubDate>Mon, 17 Nov 2008 21:54:17 GMT</pubDate>
      <description>&lt;p&gt;
After announcing the &lt;a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,aca4f6ce-32bb-47ab-a453-5b23c25b3d48.aspx"&gt;MdxInjection
program&lt;/a&gt; I got several requests for additional details and for the ability to run
it without using Visual Studio. So, here are some important points:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
When I published it I had developers in mind because I'm sure than anyone will want
to do his little modification before using it for his own needs. That's why I published
it as a solution and not as executable. 
&lt;li&gt;
I written it down using VS2008 but only with the .Net 2 framework. Those of you who
uses VS2005 won't be able to open the solution. 
&lt;li&gt;
The program has only one public method - InjectMdx, who takes two arguments: The&amp;nbsp;location
of the CommonMdx file and the location of the xml configuration file. 
&lt;li&gt;
The CommonMdx.mdx file contains the common MDX script. The relevant part&amp;nbsp;has
to start with /* Common MDX */ and then the common mdx script. Anything written before
it won't be treated. That gives you the ability to save some data or comments for
yourself in this file. 
&lt;li&gt;
Example of the configuration xml file can be found in the Test libary inside the solution.
Basically, it enable you to define in which servers, databases and cubes you want
to inject the common script. Pay attention that you have to write the connection strings
in this file. 
&lt;li&gt;
Note that the program will detect cube dimensions with their name changed and will
know how to replace them. That means that if you mention the Time dimension in the
common script and inject it to AdventureWorks cube, the script will replace the&amp;nbsp;string
"Time"&amp;nbsp;with the "ShipmentDate" string, for example.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
For those of you who want simple execution file, I added a windows console project
in the solution.
&lt;/p&gt;
&lt;a href="http://www.miky-schreiber.com/blog/content/binary/MdxInjectionConsoleApp.zip"&gt;Link
to only executable program&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://www.miky-schreiber.com/blog/content/binary/MdxInjection2.zip"&gt;Link
to the solution with the added windows application project&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://www.miky-schreiber.com/blog/content/binary/MdxInjection.zip"&gt;Link
to the solution without the windows application project&lt;/a&gt;&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=5c9ebeb3-98d5-43ea-9f63-a0e18c3929bd" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,5c9ebeb3-98d5-43ea-9f63-a0e18c3929bd.aspx</comments>
      <category>BI;BI/MDX;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services;BI/SQL Server 2008;BI/SQL Server 2008/Analysis Services;Programming;Programming/.Net</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=aca4f6ce-32bb-47ab-a453-5b23c25b3d48</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,aca4f6ce-32bb-47ab-a453-5b23c25b3d48.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,aca4f6ce-32bb-47ab-a453-5b23c25b3d48.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=aca4f6ce-32bb-47ab-a453-5b23c25b3d48</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In the <a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,f5f76417-9128-4fd7-a8d6-ba60619df30e.aspx">previous
post</a> I talked about the DRY principle in the BI Development. I mentioned that
one of the major problems in the principle's implementation is in the common MDX code. <a href="http://cwebbbi.spaces.live.com/">Chris</a> Commented:
</p>
        <p>
"I'd like to be able to have a global MDX Script and be able to do something like
a #include to bring calculations into specific cubes. One to add to my wishlist for
the next version..."
</p>
        <p>
And as I said there that I have a temporary good solution until we'll have
it in the next SQL Server release (if someone from Microsoft is reading...).
</p>
        <p>
The MdxInjection program takes your common MDX Script and a very simple xml file that
defines where to inject this script. It injects the script into your desired cubes
and even replaces the dimensions' names where necessary (it is relevant where you
put dimension in a cube with a different name to thr dimension or when you use Role
Playing Dimensions). I couldn't hold myself from writing some test code so it's also
included in the project. The project is written in C# 2 using much AMO code. All the
technical little details are inside.
</p>
        <p>
Enjoy.
</p>
        <p>
          <a href="http://www.miky-schreiber.com/blog/content/binary/MdxInjection.zip">Download
Link</a>
        </p>
        <img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=aca4f6ce-32bb-47ab-a453-5b23c25b3d48" />
      </body>
      <title>The MdxInjection Program</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,aca4f6ce-32bb-47ab-a453-5b23c25b3d48.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,aca4f6ce-32bb-47ab-a453-5b23c25b3d48.aspx</link>
      <pubDate>Sun, 16 Nov 2008 23:29:02 GMT</pubDate>
      <description>&lt;p&gt;
In the &lt;a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,f5f76417-9128-4fd7-a8d6-ba60619df30e.aspx"&gt;previous
post&lt;/a&gt; I talked about the DRY principle in the BI Development. I mentioned that
one of the major problems in the principle's implementation is in the common MDX code. &lt;a href="http://cwebbbi.spaces.live.com/"&gt;Chris&lt;/a&gt; Commented:
&lt;/p&gt;
&lt;p&gt;
"I'd like to be able to have a global MDX Script and be able to do something like
a #include to bring calculations into specific cubes. One to add to my wishlist for
the next version..."
&lt;/p&gt;
&lt;p&gt;
And as I said there&amp;nbsp;that&amp;nbsp;I have a temporary good solution until we'll have
it in the next SQL Server release (if someone from Microsoft is reading...).
&lt;/p&gt;
&lt;p&gt;
The MdxInjection program takes your common MDX Script and a very simple xml file that
defines where to inject this script. It injects the script into your desired cubes
and even replaces the dimensions' names where necessary (it is relevant where you
put dimension in a cube with a different name to thr dimension or when you use Role
Playing Dimensions). I couldn't hold myself from writing some test code so it's also
included in the project. The project is written in C# 2 using much AMO code. All the
technical little details are inside.
&lt;/p&gt;
&lt;p&gt;
Enjoy.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.miky-schreiber.com/blog/content/binary/MdxInjection.zip"&gt;Download
Link&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=aca4f6ce-32bb-47ab-a453-5b23c25b3d48" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,aca4f6ce-32bb-47ab-a453-5b23c25b3d48.aspx</comments>
      <category>BI;BI/MDX;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services;BI/SQL Server 2008;BI/SQL Server 2008/Analysis Services;Programming;Programming/.Net</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=e83c59f6-3548-4bb0-b608-965db296ddd0</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,e83c59f6-3548-4bb0-b608-965db296ddd0.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,e83c59f6-3548-4bb0-b608-965db296ddd0.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=e83c59f6-3548-4bb0-b608-965db296ddd0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
There is one tiny new feature in SSAS 2008 that you can easily miss. It called Empty
Cube. When you create a new cube using the wizard, you can create an empty cube, meaning
that it has no measures, dimension relationships, etc. The original use of it is for
"users (who) want to create everything manually, or when all dimensions are linked
dimensions" (taken from the description in the wizard)
</p>
        <p>
          <img src="http://www.miky-schreiber.com/Blog/content/binary/emptyCube.jpg" />
        </p>
        <p>
In the past, I <a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,007d23dd-cf72-4096-8130-6bc2a0cc1783.aspx">written</a> about
using SSAS with Visual SourceSafe in order to have source and version control for
the SSAS project. I mentioned that it has many disadvantages but the big advantage
(source &amp; version control) is bigger so in the bottom line I recommend using it.
One of the problems we experienced were that every time that someone creates a new
object (cube, dimension, etc.) he has to check out the .dwproj file. The result
is that sometimes we have a fight in the team for that file and we shouting: "who
taken out the dwproj???" (yeah, I know that we can check who did it inside VSS but
shouting is more fun).
</p>
        <p>
The empty cube feature is a nice solution for this problem: When you create a new
project you can create all the (empty) cubes and then the .dwproj file is free and
no longer needed. I'm assuming that you know which cubes you'll have when starting
a new project. The only thing remained is the same solution for dimensions. I'll recommend
it in the Connect site (it's not working now for some reason).
</p>
        <img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=e83c59f6-3548-4bb0-b608-965db296ddd0" />
      </body>
      <title>Unexpected Use for Empty Cubes</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,e83c59f6-3548-4bb0-b608-965db296ddd0.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,e83c59f6-3548-4bb0-b608-965db296ddd0.aspx</link>
      <pubDate>Sun, 17 Aug 2008 17:50:41 GMT</pubDate>
      <description>&lt;p&gt;
There is one tiny new feature in SSAS 2008 that you can easily miss. It called Empty
Cube. When you create a new cube using the wizard, you can create an empty cube, meaning
that it has no measures, dimension relationships, etc. The original use of it is for
"users (who) want to create everything manually, or when all dimensions are linked
dimensions" (taken from the description in the wizard)
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.miky-schreiber.com/Blog/content/binary/emptyCube.jpg"&gt;
&lt;/p&gt;
&lt;p&gt;
In the past, I &lt;a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,007d23dd-cf72-4096-8130-6bc2a0cc1783.aspx"&gt;written&lt;/a&gt; about
using SSAS with Visual SourceSafe in order to have source and version control for
the SSAS project. I mentioned that it has many disadvantages but the big advantage
(source &amp;amp; version control) is bigger so in the bottom line I recommend using it.
One of the problems we experienced were that every time that someone creates a new
object (cube, dimension, etc.)&amp;nbsp;he has to check out the .dwproj file. The result
is that sometimes we have a fight in the team for that file and we shouting: "who
taken out the dwproj???" (yeah, I know that we can check who did it inside VSS but
shouting is more fun).
&lt;/p&gt;
&lt;p&gt;
The empty cube feature is a nice solution for this problem: When you create a new
project you can create all the (empty) cubes and then the .dwproj file is free and
no longer needed. I'm assuming that you know which cubes you'll have when starting
a new project. The only thing remained is the same solution for dimensions. I'll recommend
it in the Connect site (it's not working now for some reason).
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=e83c59f6-3548-4bb0-b608-965db296ddd0" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,e83c59f6-3548-4bb0-b608-965db296ddd0.aspx</comments>
      <category>BI;BI/SQL Server 2008;BI/SQL Server 2008/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=a53efa89-7232-4d27-b27e-0e3174beeaf0</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,a53efa89-7232-4d27-b27e-0e3174beeaf0.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,a53efa89-7232-4d27-b27e-0e3174beeaf0.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=a53efa89-7232-4d27-b27e-0e3174beeaf0</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <b>
          <i>
            <u>update:</u>
          </i>
        </b> Chris Webb
and Mosha commented and made it clear that the reason for this error wrap is the NonEmptyCrossJoin
function and nothing else. I also checked and I did not find any other function that
wraps underlying errors.<br /><br />
This is something you need to be aware of when you're writing MDX. I don't know whether
it's a bug or by-design. I'll be happy 
<br />
to know (please comment if you know something that I don't).<br />
Consider the following MDX:<br /><br /><span id="FormatMDX"><span style="font-family: Courier New; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="color: blue;">SELECT </span><br />
  <span style="color: blue;">NonEmptyCrossJoin</span><br />
  (<br />
    [Customer].[Customer Geography].[State-Province].&amp;[NSW]&amp;[AU].<span style="color: blue;">Children</span><br />
   ,[Employee].[Employee Department].[Department].&amp;[Sales]<br />
  ) ON 0<br /><span style="color: blue;">FROM </span>[Adventure Works];<br /><br /></span></span>The query will return with this error:<span id="FormatMDX"><span style="font-family: Courier New; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> The
Set_Count argument of the NonEmptyCrossJoin function is either negative or larger
than the number of sets provided. </span></span>This is quite reasonable because I
written the second argument as a member, where (NonEmpty)CrossJoin expects only sets.
So, let's upgrade this member to a set:<br /><br /><span id="FormatMDX"><span style="font-family: Courier New; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="color: blue;">SELECT </span><br />
  <span style="color: blue;">NonEmptyCrossJoin</span><br />
  (<br />
    [Customer].[Customer Geography].[State-Province].&amp;[NSW]&amp;[AU].<span style="color: blue;">Children</span><br />
   ,{[Employee].[Employee Department].[Department].&amp;[Sales]}<br />
  ) ON 0<br /><span style="color: blue;">FROM </span>[Adventure Works];</span></span><br /><br />
All I did is wrapping the second argument with {} and we have a set. The query will
return 19 columns.<br />
Now, for the interesting part. Let's count the members of this CrossJoin before the
we fix it:<br /><br /><span id="FormatMDX"><span style="font-family: Courier New; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="color: blue;">WITH </span><br />
  <span style="color: blue;">MEMBER</span> [a] <span style="color: blue;">AS</span><br />
    <span style="color: blue;">NonEmptyCrossJoin</span><br />
    (<br />
      [Customer].[Customer Geography].[State-Province].&amp;[NSW]&amp;[AU].<span style="color: blue;">Children</span><br />
     ,[Employee].[Employee Department].[Department].&amp;[Sales]<br />
    ).<span style="color: blue;">Count</span><br /><span style="color: blue;">SELECT </span><br />
  [a] ON 0<br /><span style="color: blue;">FROM </span>[Adventure Works];</span></span><br /><br />
This return... 0.                <img src="http://www.miky-schreiber.com/Blog/content/binary/mdxZero.JPG" border="0" /><br /><b>Where is the error?</b><br />
My guess is that the Count function wraps the error. The NonEmptyCrossJoin returns
null and the count of members in null is zero. The meaning of this is that if you'll
ever forget to wrap the member with {} you'll always get zero and not an error. This
can be very dangerous. Just for the check, running this query after the fix:<br /><br /><span id="FormatMDX"><span style="font-family: Courier New; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="color: blue;">WITH </span><br />
  <span style="color: blue;">MEMBER</span> [a] <span style="color: blue;">AS</span><br />
    <span style="color: blue;">NonEmptyCrossJoin</span><br />
    (<br />
      [Customer].[Customer Geography].[State-Province].&amp;[NSW]&amp;[AU].<span style="color: blue;">Children</span><br />
     ,{[Employee].[Employee Department].[Department].&amp;[Sales]}<br />
    ).<span style="color: blue;">Count</span><br /><span style="color: blue;">SELECT </span><br />
  [a] ON 0<br /><span style="color: blue;">FROM </span>[Adventure Works];</span></span><br /><br />
will return 19. This been tested with both SSAS 2005 and 2008 (RC0). The examples
here are from RC0.<br /><br />
Be careful with your MDX.<br /><br /><img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=a53efa89-7232-4d27-b27e-0e3174beeaf0" /></body>
      <title>Error Wrap in MDX</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,a53efa89-7232-4d27-b27e-0e3174beeaf0.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,a53efa89-7232-4d27-b27e-0e3174beeaf0.aspx</link>
      <pubDate>Sun, 03 Aug 2008 19:28:26 GMT</pubDate>
      <description>&lt;b&gt;&lt;i&gt;&lt;u&gt;update:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt; Chris Webb and Mosha commented and made it clear that
the reason for this error wrap is the NonEmptyCrossJoin function and nothing else.
I also checked and I did not find any other function that wraps underlying errors.&lt;br&gt;
&lt;br&gt;
This is something you need to be aware of when you're writing MDX. I don't know whether
it's a bug or by-design. I'll be happy 
&lt;br&gt;
to know (please comment if you know something that I don't).&lt;br&gt;
Consider the following MDX:&lt;br&gt;
&lt;br&gt;
&lt;span id="FormatMDX"&gt;&lt;span style="font-family: Courier New; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;&lt;span style="color: blue;"&gt;SELECT &lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;NonEmptyCrossJoin&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;(&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[Customer].[Customer Geography].[State-Province].&amp;amp;[NSW]&amp;amp;[AU].&lt;span style="color: blue;"&gt;Children&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;,[Employee].[Employee Department].[Department].&amp;amp;[Sales]&lt;br&gt;
&amp;nbsp;&amp;nbsp;) ON 0&lt;br&gt;
&lt;span style="color: blue;"&gt;FROM &lt;/span&gt;[Adventure Works];&lt;br&gt;
&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;The query will return with this error:&lt;span id="FormatMDX"&gt;&lt;span style="font-family: Courier New; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt; The
Set_Count argument of the NonEmptyCrossJoin function is either negative or larger
than the number of sets provided. &lt;/span&gt;&lt;/span&gt;This is quite reasonable because I
written the second argument as a member, where (NonEmpty)CrossJoin expects only sets.
So, let's upgrade this member to a set:&lt;br&gt;
&lt;br&gt;
&lt;span id="FormatMDX"&gt;&lt;span style="font-family: Courier New; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;&lt;span style="color: blue;"&gt;SELECT &lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;NonEmptyCrossJoin&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;(&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[Customer].[Customer Geography].[State-Province].&amp;amp;[NSW]&amp;amp;[AU].&lt;span style="color: blue;"&gt;Children&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;,{[Employee].[Employee Department].[Department].&amp;amp;[Sales]}&lt;br&gt;
&amp;nbsp;&amp;nbsp;) ON 0&lt;br&gt;
&lt;span style="color: blue;"&gt;FROM &lt;/span&gt;[Adventure Works];&lt;/span&gt;&lt;/span&gt;
&lt;br&gt;
&lt;br&gt;
All I did is wrapping the second argument with {} and we have a set. The query will
return 19 columns.&lt;br&gt;
Now, for the interesting part. Let's count the members of this CrossJoin before the
we fix it:&lt;br&gt;
&lt;br&gt;
&lt;span id="FormatMDX"&gt;&lt;span style="font-family: Courier New; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;&lt;span style="color: blue;"&gt;WITH &lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;MEMBER&lt;/span&gt; [a] &lt;span style="color: blue;"&gt;AS&lt;/span&gt; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;NonEmptyCrossJoin&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[Customer].[Customer Geography].[State-Province].&amp;amp;[NSW]&amp;amp;[AU].&lt;span style="color: blue;"&gt;Children&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;,[Employee].[Employee Department].[Department].&amp;amp;[Sales]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;).&lt;span style="color: blue;"&gt;Count&lt;/span&gt; 
&lt;br&gt;
&lt;span style="color: blue;"&gt;SELECT &lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;[a] ON 0&lt;br&gt;
&lt;span style="color: blue;"&gt;FROM &lt;/span&gt;[Adventure Works];&lt;/span&gt;&lt;/span&gt;
&lt;br&gt;
&lt;br&gt;
This return... 0.&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;&amp;nbsp;&amp;nbsp; &lt;img src="http://www.miky-schreiber.com/Blog/content/binary/mdxZero.JPG" border="0"&gt;
&lt;br&gt;
&lt;b&gt;Where is the error?&lt;/b&gt;
&lt;br&gt;
My guess is that the Count function wraps the error. The NonEmptyCrossJoin returns
null and the count of members in null is zero. The meaning of this is that if you'll
ever forget to wrap the member with {} you'll always get zero and not an error. This
can be very dangerous. Just for the check, running this query after the fix:&lt;br&gt;
&lt;br&gt;
&lt;span id="FormatMDX"&gt;&lt;span style="font-family: Courier New; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;&lt;span style="color: blue;"&gt;WITH &lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;MEMBER&lt;/span&gt; [a] &lt;span style="color: blue;"&gt;AS&lt;/span&gt; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;NonEmptyCrossJoin&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[Customer].[Customer Geography].[State-Province].&amp;amp;[NSW]&amp;amp;[AU].&lt;span style="color: blue;"&gt;Children&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;,{[Employee].[Employee Department].[Department].&amp;amp;[Sales]}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;).&lt;span style="color: blue;"&gt;Count&lt;/span&gt; 
&lt;br&gt;
&lt;span style="color: blue;"&gt;SELECT &lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;[a] ON 0&lt;br&gt;
&lt;span style="color: blue;"&gt;FROM &lt;/span&gt;[Adventure Works];&lt;/span&gt;&lt;/span&gt;
&lt;br&gt;
&lt;br&gt;
will return 19. This been tested with both SSAS 2005 and 2008 (RC0). The examples
here are from RC0.&lt;br&gt;
&lt;br&gt;
Be careful with your MDX.&lt;br&gt;
&lt;br&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=a53efa89-7232-4d27-b27e-0e3174beeaf0" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,a53efa89-7232-4d27-b27e-0e3174beeaf0.aspx</comments>
      <category>BI;BI/MDX;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services;BI/SQL Server 2008;BI/SQL Server 2008/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=c2148820-1e7d-47f2-bfea-ba50fdd639d1</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,c2148820-1e7d-47f2-bfea-ba50fdd639d1.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,c2148820-1e7d-47f2-bfea-ba50fdd639d1.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=c2148820-1e7d-47f2-bfea-ba50fdd639d1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I started a long <font color="#0000ff"><a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3197183&amp;SiteID=1">conversation</a></font> about
this subject in the <font color="#0000ff"><a href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=83&amp;SiteID=1">MDSN
SSAS forum</a></font>. I think that it's a question and a principal that every advanced
MDX programmer should be familiar with.<br /><br />
It all started with a customer that needed a standard deviation aggregation. I thought
that it would be simple because there's a <a href="http://msdn.microsoft.com/en-us/library/ms146034.aspx">StdDev
function</a> in MDX, but it turned out that my customer had major plans for me: He
wanted this aggregation to act for every dimension he puts on his axis. This means
that the aggregation is not defined over a specific dimension (such as date), but
the std-dev is defined over the current dimension in the axis.<br /><br />
The solution for this problem consists of a principle and an answer.<br /><br /><u>The Principle<br /></u>Aggregation or a measure that is based on the current user's query is bad. This
can and will result two users to see different results using the same measure. This
will cause confusion and disinformation. The sacred principle of One Truth will be
desecrated. Taken from the thread, in <a href="http://cwebbbi.spaces.live.com">Chris
Webb</a>'s words:<br /><br />
"<i><span id="_ctl0_MainContent_PostFlatView"><span>I quite often see people wanting
to write calculations that behave differently depending on the query that's being
run, and I always tell them not to do it. You can hack something but it's almost impossible
to get it work properly for every single possible query - MDX just doesn't work like
that</span></span></i>"<br /><br />
In the end I explained that to the user and he agreed. One more reason for his approval
is that std-dev often doesn't really says something about the data. In other words,
it isn't informative. "The standard deviation is 0.432. That means that... ???"<br /><p></p><br /><u>The Answer</u><br />
If you (or the customer) still insists on that crazy measure, the following MDX will
work.<br /><br /><div><font face="Courier">With<br />
Member <font color="Blue">[</font>Measures<font color="Blue">]</font><font color="Blue">.</font><font color="Blue">[</font>RowSTDOrders<font color="Blue">]</font> <font color="Blue">as</font><br />
iif<font color="Blue">(</font>Count<font color="Blue">(</font>NonEmpty<font color="Blue">(</font>StrToSet<font color="Blue">(</font><font color="Maroon">"Axis(1)"</font><font color="Blue">)</font><font color="Blue">.</font>Item<font color="Blue">(</font><font color="Maroon">0</font><font color="Blue">)</font><font color="Blue">.</font>Hierarchy<font color="Blue">.</font>Children, 
<br /><font color="Blue">{</font><font color="Blue">[</font>Measures<font color="Blue">]</font><font color="Blue">.</font><font color="Blue">[</font>Order Quantity<font color="Blue">]</font><font color="Blue">}</font><font color="Blue">)</font> <font color="Blue">as</font> ChildSet<font color="Blue">)</font> &lt; <font color="Maroon">2</font>, 
<br />
Null, 
<br />
StDev<font color="Blue">(</font>ChildSet, <font color="Blue">[</font>Measures<font color="Blue">]</font><font color="Blue">.</font><font color="Blue">[</font>Order Quantity<font color="Blue">]</font><font color="Blue">)</font><font color="Blue">)<br /></font> <br />
select 
<br /><font color="Blue">[</font>Date<font color="Blue">]</font><font color="Blue">.</font><font color="Blue">[</font>Calendar Year<font color="Blue">]</font><font color="Blue">.</font><font color="Blue">[</font>Calendar Year<font color="Blue">]</font> on <font color="Maroon">0</font>, 
<br />
Non Empty <font color="Blue">[</font>Product<font color="Blue">]</font><font color="Blue">.</font><font color="Blue">[</font>Product Categories<font color="Blue">]</font><font color="Blue">.</font>Members on <font color="Maroon">1</font><br />
from <font color="Blue">[</font>Adventure Works<font color="Blue">]</font><br />
where <font color="Blue">[</font>Measures<font color="Blue">]</font><font color="Blue">.</font><font color="Blue">[</font>RowSTDOrders<font color="Blue">]<br /><br /></font></font>Thanks for Deepak Puri for this code. Notice that the StrToSet function
will cause performance degrade, but this is the only way that the code will also work
in MDX script and not only in queries.<br /><br />
P.S<br />
It doesn't matter if you write StDev or StdDev.<br /></div><img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=c2148820-1e7d-47f2-bfea-ba50fdd639d1" /></body>
      <title>Very Customed Aggregation</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,c2148820-1e7d-47f2-bfea-ba50fdd639d1.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,c2148820-1e7d-47f2-bfea-ba50fdd639d1.aspx</link>
      <pubDate>Tue, 13 May 2008 20:28:38 GMT</pubDate>
      <description>I started a long &lt;font color="#0000ff"&gt;&lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3197183&amp;amp;SiteID=1"&gt;conversation&lt;/a&gt;&lt;/font&gt; about
this subject in the &lt;font color="#0000ff"&gt;&lt;a href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=83&amp;amp;SiteID=1"&gt;MDSN
SSAS forum&lt;/a&gt;&lt;/font&gt;. I think that it's a question and a principal that every advanced
MDX programmer should be familiar with.&lt;br&gt;
&lt;br&gt;
It all started with a customer that needed a standard deviation aggregation. I thought
that it would be simple because there's a &lt;a href="http://msdn.microsoft.com/en-us/library/ms146034.aspx"&gt;StdDev
function&lt;/a&gt; in MDX, but it turned out that my customer had major plans for me: He
wanted this aggregation to act for every dimension he puts on his axis. This means
that the aggregation is not defined over a specific dimension (such as date), but
the std-dev is defined over the current dimension in the axis.&lt;br&gt;
&lt;br&gt;
The solution for this problem consists of a principle and an answer.&lt;br&gt;
&lt;br&gt;
&lt;u&gt;The Principle&lt;br&gt;
&lt;/u&gt;Aggregation or a measure that is based on the current user's query is bad. This
can and will result two users to see different results using the same measure. This
will cause confusion and disinformation. The sacred principle of One Truth will be
desecrated. Taken from the thread, in &lt;a href="http://cwebbbi.spaces.live.com"&gt;Chris
Webb&lt;/a&gt;'s words:&lt;br&gt;
&lt;br&gt;
"&lt;i&gt;&lt;span id="_ctl0_MainContent_PostFlatView"&gt;&lt;span&gt;I quite often see people wanting
to write calculations that behave differently depending on the query that's being
run, and I always tell them not to do it. You can hack something but it's almost impossible
to get it work properly for every single possible query - MDX just doesn't work like
that&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;"&lt;br&gt;
&lt;br&gt;
In the end I explained that to the user and he agreed. One more reason for his approval
is that std-dev often doesn't really says something about the data. In other words,
it isn't informative. "The standard deviation is 0.432. That means that... ???"&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;br&gt;
&lt;u&gt;The Answer&lt;/u&gt;
&lt;br&gt;
If you (or the customer) still insists on that crazy measure, the following MDX will
work.&lt;br&gt;
&lt;br&gt;
&lt;div&gt;&lt;font face="Courier"&gt;With&lt;br&gt;
Member&amp;nbsp;&lt;font color="Blue"&gt;[&lt;/font&gt;Measures&lt;font color="Blue"&gt;]&lt;/font&gt;&lt;font color="Blue"&gt;.&lt;/font&gt;&lt;font color="Blue"&gt;[&lt;/font&gt;RowSTDOrders&lt;font color="Blue"&gt;]&lt;/font&gt;&amp;nbsp;&lt;font color="Blue"&gt;as&lt;/font&gt; 
&lt;br&gt;
iif&lt;font color="Blue"&gt;(&lt;/font&gt;Count&lt;font color="Blue"&gt;(&lt;/font&gt;NonEmpty&lt;font color="Blue"&gt;(&lt;/font&gt;StrToSet&lt;font color="Blue"&gt;(&lt;/font&gt;&lt;font color="Maroon"&gt;"Axis(1)"&lt;/font&gt;&lt;font color="Blue"&gt;)&lt;/font&gt;&lt;font color="Blue"&gt;.&lt;/font&gt;Item&lt;font color="Blue"&gt;(&lt;/font&gt;&lt;font color="Maroon"&gt;0&lt;/font&gt;&lt;font color="Blue"&gt;)&lt;/font&gt;&lt;font color="Blue"&gt;.&lt;/font&gt;Hierarchy&lt;font color="Blue"&gt;.&lt;/font&gt;Children, 
&lt;br&gt;
&lt;font color="Blue"&gt;{&lt;/font&gt;&lt;font color="Blue"&gt;[&lt;/font&gt;Measures&lt;font color="Blue"&gt;]&lt;/font&gt;&lt;font color="Blue"&gt;.&lt;/font&gt;&lt;font color="Blue"&gt;[&lt;/font&gt;Order&amp;nbsp;Quantity&lt;font color="Blue"&gt;]&lt;/font&gt;&lt;font color="Blue"&gt;}&lt;/font&gt;&lt;font color="Blue"&gt;)&lt;/font&gt;&amp;nbsp;&lt;font color="Blue"&gt;as&lt;/font&gt;&amp;nbsp;ChildSet&lt;font color="Blue"&gt;)&lt;/font&gt;&amp;nbsp;&amp;lt;&amp;nbsp;&lt;font color="Maroon"&gt;2&lt;/font&gt;, 
&lt;br&gt;
Null, 
&lt;br&gt;
StDev&lt;font color="Blue"&gt;(&lt;/font&gt;ChildSet,&amp;nbsp;&lt;font color="Blue"&gt;[&lt;/font&gt;Measures&lt;font color="Blue"&gt;]&lt;/font&gt;&lt;font color="Blue"&gt;.&lt;/font&gt;&lt;font color="Blue"&gt;[&lt;/font&gt;Order&amp;nbsp;Quantity&lt;font color="Blue"&gt;]&lt;/font&gt;&lt;font color="Blue"&gt;)&lt;/font&gt;&lt;font color="Blue"&gt;)&lt;br&gt;
&lt;/font&gt;&amp;nbsp;&lt;br&gt;
select 
&lt;br&gt;
&lt;font color="Blue"&gt;[&lt;/font&gt;Date&lt;font color="Blue"&gt;]&lt;/font&gt;&lt;font color="Blue"&gt;.&lt;/font&gt;&lt;font color="Blue"&gt;[&lt;/font&gt;Calendar&amp;nbsp;Year&lt;font color="Blue"&gt;]&lt;/font&gt;&lt;font color="Blue"&gt;.&lt;/font&gt;&lt;font color="Blue"&gt;[&lt;/font&gt;Calendar&amp;nbsp;Year&lt;font color="Blue"&gt;]&lt;/font&gt;&amp;nbsp;on&amp;nbsp;&lt;font color="Maroon"&gt;0&lt;/font&gt;, 
&lt;br&gt;
Non&amp;nbsp;Empty&amp;nbsp;&lt;font color="Blue"&gt;[&lt;/font&gt;Product&lt;font color="Blue"&gt;]&lt;/font&gt;&lt;font color="Blue"&gt;.&lt;/font&gt;&lt;font color="Blue"&gt;[&lt;/font&gt;Product&amp;nbsp;Categories&lt;font color="Blue"&gt;]&lt;/font&gt;&lt;font color="Blue"&gt;.&lt;/font&gt;Members&amp;nbsp;on&amp;nbsp;&lt;font color="Maroon"&gt;1&lt;/font&gt; 
&lt;br&gt;
from&amp;nbsp;&lt;font color="Blue"&gt;[&lt;/font&gt;Adventure&amp;nbsp;Works&lt;font color="Blue"&gt;]&lt;/font&gt; 
&lt;br&gt;
where&amp;nbsp;&lt;font color="Blue"&gt;[&lt;/font&gt;Measures&lt;font color="Blue"&gt;]&lt;/font&gt;&lt;font color="Blue"&gt;.&lt;/font&gt;&lt;font color="Blue"&gt;[&lt;/font&gt;RowSTDOrders&lt;font color="Blue"&gt;]&lt;br&gt;
&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;Thanks for Deepak Puri for this code. Notice that the StrToSet function
will cause performance degrade, but this is the only way that the code will also work
in MDX script and not only in queries.&lt;br&gt;
&lt;br&gt;
P.S&lt;br&gt;
It doesn't matter if you write StDev or StdDev.&lt;br&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=c2148820-1e7d-47f2-bfea-ba50fdd639d1" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,c2148820-1e7d-47f2-bfea-ba50fdd639d1.aspx</comments>
      <category>BI;BI/MDX;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services;BI/SQL Server 2008;BI/SQL Server 2008/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=01c86eba-f351-463e-a796-feffea5898fe</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,01c86eba-f351-463e-a796-feffea5898fe.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,01c86eba-f351-463e-a796-feffea5898fe.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=01c86eba-f351-463e-a796-feffea5898fe</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">This tiny thing cost me a minute today,
but it may take longer time to some of you, so I'm writing this.<br /><br />
As some of you know, in order to sort a dimension's attribute you need to change to
OrderBy property of the attribute. You can make the attribute to be sorted according
to other attribute (it's a very common thing in SSAS). In order to do so, you set
the OrderBy property to AttributeKey and in the OrderByAttribute property you pick
up the desired attribute (the one you want to define the order).<br /><br /><b>Note that</b> if the first attribute (the one you want to sort) doesn't have attribute-relationship
to the second attribute, you won't be able to pick up the second attribute in the
OrderByAttribute property. These properties must have an attribute-relationship.<br />
One more thing: You don't have to show the end-user the attribute which defines the
order. If you want to hide it just set the property AttributeHierarchyVisible to false.
It is a common pattern to make an attribute which will sort another attribute and
hide it from the user.<br /><p></p><img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=01c86eba-f351-463e-a796-feffea5898fe" /></body>
      <title>Little note about sorting a dimension</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,01c86eba-f351-463e-a796-feffea5898fe.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,01c86eba-f351-463e-a796-feffea5898fe.aspx</link>
      <pubDate>Wed, 07 May 2008 21:32:59 GMT</pubDate>
      <description>This tiny thing cost me a minute today, but it may take longer time to some of you, so I'm writing this.&lt;br&gt;
&lt;br&gt;
As some of you know, in order to sort a dimension's attribute you need to change to
OrderBy property of the attribute. You can make the attribute to be sorted according
to other attribute (it's a very common thing in SSAS). In order to do so, you set
the OrderBy property to AttributeKey and in the OrderByAttribute property you pick
up the desired attribute (the one you want to define the order).&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Note that&lt;/b&gt; if the first attribute (the one you want to sort) doesn't have attribute-relationship
to the second attribute, you won't be able to pick up the second attribute in the
OrderByAttribute property. These properties must have an attribute-relationship.&lt;br&gt;
One more thing: You don't have to show the end-user the attribute which defines the
order. If you want to hide it just set the property AttributeHierarchyVisible to false.
It is a common pattern to make an attribute which will sort another attribute and
hide it from the user.&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=01c86eba-f351-463e-a796-feffea5898fe" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,01c86eba-f351-463e-a796-feffea5898fe.aspx</comments>
      <category>BI;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services;BI/SQL Server 2008;BI/SQL Server 2008/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=40de294b-84e7-4d53-bc33-fd023e9a514f</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,40de294b-84e7-4d53-bc33-fd023e9a514f.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,40de294b-84e7-4d53-bc33-fd023e9a514f.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=40de294b-84e7-4d53-bc33-fd023e9a514f</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">We got many client requests for the ability
to show in their web sites the "last updated" date of the data.<br />
It doesn't matter how you show the data of the SSAS - the customers will always want
to know for which date the data is true.<br />
My solution includes a ASP.NET 2.0 web site that uses the AMO class libary. It takes
the date from the server and shows it to the user.<br /><br />
What you need to do is:<br />
1. Open a new ASP.NET web site using Visual Studio 2005/8.<br />
2. Add the AMO dll (Microsoft.Analysis Services). You'll find it in the SSAS server.<br />
3. In the already-made default.aspx page, just add one Label.<br />
4. Add a configuration file which will hold the name of the SSAS server. That way,
when you install the site from the development environment to the production environment,
you'll only have to change this file. Call this file config.xml and write in it the
following:<br />
&lt;?xml version="1.0" encoding="utf-8" ?&gt;<br />
&lt;ServerName&gt;YourServerFullNameHere&lt;/ServerName&gt;<br /><br />
5. In the code-behind file (default.aspx.cs) write the following code instead of what
you already have there:<br /><br />
using System;<br />
using System.Data;<br />
using System.Configuration;<br />
using System.Web;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Web.UI.HtmlControls;<br />
using AMO = Microsoft.AnalysisServices;<br />
using System.Xml;<br /><br />
public partial class _Default : System.Web.UI.Page<br />
{<br />
  protected void Load_Page(Object sender, EventArgs e)<br />
  {<br />
    Label1.Text = GetCubeUpdateDate(Request.QueryString["DBName"],Request.QueryString["CubeId"]);<br />
  }<br /><br />
  private string GetCubeUpdateDate (string dbName, string cubeId)<br />
  {<br />
    using (AMO.Server asServer = new AMO.Server())<br />
    {<br />
      asServer.Connect("Data Source=" + GetAnalysisServerName());<br />
      AMO.Database db = asServer.DataBases.FindByName(dbName);<br />
      if (db == null)<br />
      {<br />
        return "DB Name not found";<br />
      }<br /><br />
      AMO.Cube cube = GetCubeById(cubeId, db);<br />
      if (cube == null)<br />
      {<br />
        return "Cube Name not found";<br />
      }<br /><br />
      DateTime lastProcessed = cube.LastProcessed;<br />
      return lastProcessed.Day.ToString() + "/" + lastProcessed.Month.ToString()
+ "/" + lastProcessed.Year.ToString();<br />
    }<br />
  }<br /><br />
  private string GetAnalysisServerName ()<br />
  {<br />
    XmlDocument xmlDoc = new XmlDocument();<br />
    xmlDoc.Load(Request.PhysicalApplicationPath + "config.xml");<br />
    return xmlDoc.GetElementsByTagName("ServerName").Item(0).InnetText;<br />
  }<br /><br />
  private AMO.Cube GetCubeById (string cubeId, AMO.Database db)<br />
  {<br />
    foreach (AMO.Cube cube in db.Cubes)<br />
    {<br />
      if (cube.ID.Equals(cubeId))<br />
      {<br />
        return cube;<br />
      }<br />
    }<br />
    return null;<br />
  }<br />
}<br /><br />
Eventhough the code is self-explained, here are some points referring it:<br /><ul><li>
I chose not to include the server name in the web.config file because I like to seperate
application-related configuration and web configuration.</li><li>
If you want you can get the cube name from the user (in the query string) and then
the code is even shorter - just get the cube like I got the database.</li><li>
I wanted to show the date in the format DD/MM/YYYY, so that's why I did the long return
statement in the GetCubeUpdateDate method. If you want to return the date in the MM/DD/YYYY
format you can use the lastProcessed.GetShortDateFormat() method.</li><li>
Note that when you publish the web site you need to create a dedicated virtual folder
in the IIS.</li><li>
The user uses this site in the following way: All he need to do is to create a frame
with this site's address as its source and add it the DBName &amp; CubeId in the query
string. In SharePoint it's even easier - the uses only need to create a page shower
web part.</li></ul>
enjoy.<br /><p></p><img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=40de294b-84e7-4d53-bc33-fd023e9a514f" /></body>
      <title>How To Show the Last Update Date of the SSAS Cube</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,40de294b-84e7-4d53-bc33-fd023e9a514f.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,40de294b-84e7-4d53-bc33-fd023e9a514f.aspx</link>
      <pubDate>Mon, 31 Mar 2008 13:05:20 GMT</pubDate>
      <description>We got many client requests for the ability to show in their web sites the "last updated" date of the data.&lt;br&gt;
It doesn't matter how you show the data of the SSAS - the customers will always want
to know for which date the data is true.&lt;br&gt;
My solution includes a ASP.NET 2.0 web site that uses the AMO class libary. It takes
the date from the server and shows it to the user.&lt;br&gt;
&lt;br&gt;
What you need to do is:&lt;br&gt;
1. Open a new ASP.NET web site using Visual Studio 2005/8.&lt;br&gt;
2. Add the AMO dll (Microsoft.Analysis Services). You'll find it in the SSAS server.&lt;br&gt;
3. In the already-made default.aspx page, just add one Label.&lt;br&gt;
4. Add a configuration file which will hold the name of the SSAS server. That way,
when you install the site from the development environment to the production environment,
you'll only have to change this file. Call this file config.xml and write in it the
following:&lt;br&gt;
&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;&lt;br&gt;
&amp;lt;ServerName&amp;gt;YourServerFullNameHere&amp;lt;/ServerName&amp;gt;&lt;br&gt;
&lt;br&gt;
5. In the code-behind file (default.aspx.cs) write the following code instead of what
you already have there:&lt;br&gt;
&lt;br&gt;
using System;&lt;br&gt;
using System.Data;&lt;br&gt;
using System.Configuration;&lt;br&gt;
using System.Web;&lt;br&gt;
using System.Web.UI;&lt;br&gt;
using System.Web.UI.WebControls;&lt;br&gt;
using System.Web.UI.WebControls.WebParts;&lt;br&gt;
using System.Web.UI.HtmlControls;&lt;br&gt;
using AMO = Microsoft.AnalysisServices;&lt;br&gt;
using System.Xml;&lt;br&gt;
&lt;br&gt;
public partial class _Default : System.Web.UI.Page&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; protected void Load_Page(Object sender, EventArgs e)&lt;br&gt;
&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Label1.Text = GetCubeUpdateDate(Request.QueryString["DBName"],Request.QueryString["CubeId"]);&lt;br&gt;
&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
&amp;nbsp; private string GetCubeUpdateDate (string dbName, string cubeId)&lt;br&gt;
&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; using (AMO.Server asServer = new AMO.Server())&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; asServer.Connect("Data Source=" + GetAnalysisServerName());&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AMO.Database db = asServer.DataBases.FindByName(dbName);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (db == null)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "DB Name not found";&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AMO.Cube cube = GetCubeById(cubeId, db);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (cube == null)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "Cube Name not found";&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DateTime lastProcessed = cube.LastProcessed;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return lastProcessed.Day.ToString() + "/" + lastProcessed.Month.ToString()
+ "/" + lastProcessed.Year.ToString();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
&amp;nbsp; private string GetAnalysisServerName ()&lt;br&gt;
&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; XmlDocument xmlDoc = new XmlDocument();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlDoc.Load(Request.PhysicalApplicationPath + "config.xml");&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return xmlDoc.GetElementsByTagName("ServerName").Item(0).InnetText;&lt;br&gt;
&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
&amp;nbsp; private AMO.Cube GetCubeById (string cubeId, AMO.Database db)&lt;br&gt;
&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (AMO.Cube cube in db.Cubes)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (cube.ID.Equals(cubeId))&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return cube;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return null;&lt;br&gt;
&amp;nbsp; }&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
Eventhough the code is self-explained, here are some points referring it:&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
I chose not to include the server name in the web.config file because I like to seperate
application-related configuration and web configuration.&lt;/li&gt;
&lt;li&gt;
If you want you can get the cube name from the user (in the query string) and then
the code is even shorter - just get the cube like I got the database.&lt;/li&gt;
&lt;li&gt;
I wanted to show the date in the format DD/MM/YYYY, so that's why I did the long return
statement in the GetCubeUpdateDate method. If you want to return the date in the MM/DD/YYYY
format you can use the lastProcessed.GetShortDateFormat() method.&lt;/li&gt;
&lt;li&gt;
Note that when you publish the web site you need to create a dedicated virtual folder
in the IIS.&lt;/li&gt;
&lt;li&gt;
The user uses this site in the following way: All he need to do is to create a frame
with this site's address as its source and add it the DBName &amp;amp; CubeId in the query
string. In SharePoint it's even easier - the uses only need to create a page shower
web part.&lt;/li&gt;
&lt;/ul&gt;
enjoy.&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=40de294b-84e7-4d53-bc33-fd023e9a514f" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,40de294b-84e7-4d53-bc33-fd023e9a514f.aspx</comments>
      <category>BI;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services;BI/SQL Server 2008;BI/SQL Server 2008/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=49397c1d-d6c2-4041-9848-efd0be80d8a0</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,49397c1d-d6c2-4041-9848-efd0be80d8a0.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,49397c1d-d6c2-4041-9848-efd0be80d8a0.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=49397c1d-d6c2-4041-9848-efd0be80d8a0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Today I was in the Microsoft's Data Mining
Conference which took place in the Sheraton City Tower, Ramat-Gan (Israel, of course).
First of all - the food was good. :-) Now, seriously: All the lectures were great,
although they were performed by one man - Rafal Lukaweichi, which is a very talented
speaker. I think that I haven't seen such enthusiasm for many years in a lecture in
the IT world. Anyway, what have I learned today?<br /><ul><li>
The Data Mining world is very interesting indeed. Microsoft has a lot to offer in
DM and it is all ready-to-use in BIDS.</li><li>
Microsoft's approach is DM to the masses, which I don't believe it myself. Even though
the tools are very simple and even the code (DMX) is easy (in contradiction to MDX),
I don't think that an inexperienced developer can bring good results. The SAS approach
says that you need to have deep knowledge in statistics (which is bad), but I don't
think that DM can be made by the masses.</li><li>
There are many different DM algorithms which you need to be introduced with before
you start mining. As I mentioned, they tell you that all you need to know is what
each algorithm does in general, but in fact there are many parameters which you need
to adjust and play with, so in fact you need a good knowledge of these algorithms.</li><li>
Visualization is very important in DM. Even after you have good results in your hands,
you need good UI tools to show you the results in an efficient way or else you'll
be lost in a jungle of data.<br /></li><li>
If you already have a datawarehouse, you're half way from mining models. The preparation
of the data is a huge amount of the job in DM.</li><li>
After you have good results and even after you got good visualization of the results,
you need an expert from the company you work for (or in) that will look at the results
and tell you whether they bring new knowledge or they trivial.</li></ul>
I don't believe there's a change I'll be mining in the near future, but maybe I'll
play with it a little in my free time (which of course I don't have). Taking the data
of our datawarehouse and mining it can bring some interesting stuff. Who knows.<br /><p></p><img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=49397c1d-d6c2-4041-9848-efd0be80d8a0" /></body>
      <title>Reviews From the Microsoft Data Mining Conference</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,49397c1d-d6c2-4041-9848-efd0be80d8a0.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,49397c1d-d6c2-4041-9848-efd0be80d8a0.aspx</link>
      <pubDate>Mon, 21 Jan 2008 18:06:14 GMT</pubDate>
      <description>Today I was in the Microsoft's Data Mining Conference which took place in the Sheraton City Tower, Ramat-Gan (Israel, of course). First of all - the food was good. :-) Now, seriously: All the lectures were great, although they were performed by one man - Rafal Lukaweichi, which is a very talented speaker. I think that I haven't seen such enthusiasm for many years in a lecture in the IT world. Anyway, what have I learned today?&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
The Data Mining world is very interesting indeed. Microsoft has a lot to offer in
DM and it is all ready-to-use in BIDS.&lt;/li&gt;
&lt;li&gt;
Microsoft's approach is DM to the masses, which I don't believe it myself. Even though
the tools are very simple and even the code (DMX) is easy (in contradiction to MDX),
I don't think that an inexperienced developer can bring good results. The SAS approach
says that you need to have deep knowledge in statistics (which is bad), but I don't
think that DM can be made by the masses.&lt;/li&gt;
&lt;li&gt;
There are many different DM algorithms which you need to be introduced with before
you start mining. As I mentioned, they tell you that all you need to know is what
each algorithm does in general, but in fact there are many parameters which you need
to adjust and play with, so in fact you need a good knowledge of these algorithms.&lt;/li&gt;
&lt;li&gt;
Visualization is very important in DM. Even after you have good results in your hands,
you need good UI tools to show you the results in an efficient way or else you'll
be lost in a jungle of data.&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
If you already have a datawarehouse, you're half way from mining models. The preparation
of the data is a huge amount of the job in DM.&lt;/li&gt;
&lt;li&gt;
After you have good results and even after you got good visualization of the results,
you need an expert from the company you work for (or in) that will look at the results
and tell you whether they bring new knowledge or they trivial.&lt;/li&gt;
&lt;/ul&gt;
I don't believe there's a change I'll be mining in the near future, but maybe I'll
play with it a little in my free time (which of course I don't have). Taking the data
of our datawarehouse and mining it can bring some interesting stuff. Who knows.&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=49397c1d-d6c2-4041-9848-efd0be80d8a0" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,49397c1d-d6c2-4041-9848-efd0be80d8a0.aspx</comments>
      <category>BI;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services;BI/SQL Server 2008;BI/SQL Server 2008/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=7473180e-117f-447f-b84c-38d91bbe3374</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,7473180e-117f-447f-b84c-38d91bbe3374.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,7473180e-117f-447f-b84c-38d91bbe3374.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=7473180e-117f-447f-b84c-38d91bbe3374</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Although SSAS willl let you use them, some other application such as Panorama won't
function properly. I'll give one example: When you perform Drillthrough in Panorama,
on the fly the engine gererates a web page that will take the user to the next view.
The next view will be sliced as the current view, so this web page needs to pass the
dimensions parameter (meaning - the current slices). That's why this web page contains
this line:
</p>
        <p>
AttachParameters("Slicers","%Slicers%")
</p>
        <p>
A big problem will occur if one of the sliced dimensions will be sliced on a member
with a name that contains inverted commas ("). The JavaScript will result an error
because there are three inverted commas in the second parameter of the line. This
is only one example of what can happen in a BI consumer program if you'll use special
characters in member names. So - be careful not to pass these characters from the
DW (build the ETL so it will drop these characters) or giving those names in SSAS,
such as the All member name.
</p>
        <img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=7473180e-117f-447f-b84c-38d91bbe3374" />
      </body>
      <title>Do Not Use Special Characters in DW &amp; SSAS</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,7473180e-117f-447f-b84c-38d91bbe3374.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,7473180e-117f-447f-b84c-38d91bbe3374.aspx</link>
      <pubDate>Tue, 15 Jan 2008 14:08:32 GMT</pubDate>
      <description>&lt;p&gt;
Although SSAS willl let you use them, some other application such as Panorama won't
function properly. I'll give one example: When you perform Drillthrough in Panorama,
on the fly the engine gererates a web page that will take the user to the next view.
The next view will be sliced as the current view, so this web page needs to pass the
dimensions parameter (meaning - the current slices). That's why this web page contains
this line:
&lt;/p&gt;
&lt;p&gt;
AttachParameters("Slicers","%Slicers%")
&lt;/p&gt;
&lt;p&gt;
A big problem will occur if one of the sliced dimensions will be sliced on a member
with a name that contains inverted commas ("). The JavaScript will result an error
because there are three inverted commas in the second parameter of the line. This
is only one example of what can happen in a BI consumer program if you'll use special
characters in member names. So - be careful not to pass these characters from the
DW (build the ETL so it will drop these characters) or giving those names in SSAS,
such as the All member name.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=7473180e-117f-447f-b84c-38d91bbe3374" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,7473180e-117f-447f-b84c-38d91bbe3374.aspx</comments>
      <category>BI;BI/DataWarehousing;BI/Panorama;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services;BI/SQL Server 2008;BI/SQL Server 2008/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=2efa7c5b-826e-43c4-af42-5608fdd6c188</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,2efa7c5b-826e-43c4-af42-5608fdd6c188.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,2efa7c5b-826e-43c4-af42-5608fdd6c188.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=2efa7c5b-826e-43c4-af42-5608fdd6c188</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I feel like I don't have the right to write about it after so many bits of information
were moving in the web about this subject but I would like to add my point of view
(or in fact - my point of code). First of all, I must mention some of those who written
about this subject before me. Mosha Pasumansky wrote a long <a href="http://sqljunkies.com/WebLog/mosha/archive/2007/05/22/current_date_mdx.aspx">post</a> about
it in last may. This post contains some ideas of how to come along with this problem,
but none of them is perfect. In fact (as always) - there is no perfect solution
for this problem. Another important source of knowledge can be found <a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=346119&amp;SiteID=1">here</a> in
the MSDN forums, where Chris Webb, Thomas Pagel and others discussed it. Now,
I would like to add my solution. Take it or leave it - your choice.
</p>
        <p>
First of all, create a column in the time dimension that will be the current day indicator.
Thanks to the Data Source View or the UDM approach of SSAS 2005 you don't have to
change the relational table itself. Just add a named calculation in the DSV with expression
that will be 1 for the row of the current day and null or zero for the others. The
expression syntax itself depends on the underlying DB so I won't write it here, but
it's very simple. Add this column as an attribute (let's call it CurrentDayInd) in
the dimension structure and select its AttributeVisible propertiey to false. That's
because we don't need such Attribute Hierarchy in our time dimension. After that,
create a new User Hierarchy (you can call it Current Day), where the first level in
it will be CurrentDayInd and after it place the day (key) attribute.
</p>
        <p>
Now, what we have here? We have a hierarchy (Current Day) with two members - 1 and
zero. The 1 member has only one child which is the current day. Link that member to
your regular hierarchy (it's called YSQMD at my place) and here you have it. For example,
you can use it that way in the MDX script:
</p>
        <p>
Create Set [Last 30 Days] as<br />
LinkMember([Time].[Current Day].[CurrentDayInd].&amp;[1].Children.Item(0),[Time].[YSQMD])<br />
:<br />
LinkMember([Time].[Current Day].[CurrentDayInd].&amp;[1].Children.Item(0),[Time].[YSQMD]).Lag(30);
</p>
        <p>
I think that this solution is good and elegant. First of all, you don't have to use
external functions such as Now(). The second pro is that we use the native OLAP mechanism
which saves time and makes the queries run faster. Believe me, you'll feel the difference
with big cubes. The last thing is that this solution is easy to understand (at least
I think so) and it is easy for maintenance. The big con is that you have to process
this dimension (and related cubes) every day. I don't think that it's so bad because
most of the organizations do make process every day.
</p>
        <p>
          <br />
 
</p>
        <img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=2efa7c5b-826e-43c4-af42-5608fdd6c188" />
      </body>
      <title>Getting the Current Day in MDX</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,2efa7c5b-826e-43c4-af42-5608fdd6c188.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,2efa7c5b-826e-43c4-af42-5608fdd6c188.aspx</link>
      <pubDate>Tue, 08 Jan 2008 20:39:58 GMT</pubDate>
      <description>&lt;p&gt;
I feel like I don't have the right to write about it after so many bits of information
were moving in the web about this subject but I would like to add my point of view
(or in fact - my point of code). First of all, I must mention some of those who written
about this subject before me. Mosha Pasumansky wrote a long &lt;a href="http://sqljunkies.com/WebLog/mosha/archive/2007/05/22/current_date_mdx.aspx"&gt;post&lt;/a&gt; about
it in last may. This post contains some ideas of how to come along with this problem,
but none of them is perfect. In fact (as always) - there is no perfect&amp;nbsp;solution
for this problem. Another important source of knowledge can be found &lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=346119&amp;amp;SiteID=1"&gt;here&lt;/a&gt; in
the MSDN forums, where Chris Webb, Thomas Pagel&amp;nbsp;and others discussed it. Now,
I would like to add my solution. Take it or leave it - your choice.
&lt;/p&gt;
&lt;p&gt;
First of all, create a column in the time dimension that will be the current day indicator.
Thanks to the Data Source View or the UDM approach of SSAS 2005 you don't have to
change the relational table itself. Just add a named calculation in the DSV with expression
that will be 1 for the row of the current day and null or zero for the others. The
expression syntax itself depends on the underlying DB so I won't write it here, but
it's very simple.&amp;nbsp;Add this column as an attribute (let's call it CurrentDayInd)&amp;nbsp;in
the dimension structure and select its AttributeVisible propertiey to false. That's
because we don't need such Attribute Hierarchy in our time dimension. After that,
create a new User Hierarchy (you can call it Current Day), where the&amp;nbsp;first level&amp;nbsp;in
it will be CurrentDayInd and after it place the day (key)&amp;nbsp;attribute.
&lt;/p&gt;
&lt;p&gt;
Now, what we have here? We have a hierarchy (Current Day) with two members - 1 and
zero. The 1 member has only one child which is the current day. Link that member to
your regular hierarchy (it's called YSQMD at my place) and here you have it. For example,
you can use it that way in the MDX script:
&lt;/p&gt;
&lt;p&gt;
Create Set [Last 30 Days] as&lt;br&gt;
LinkMember([Time].[Current Day].[CurrentDayInd].&amp;amp;[1].Children.Item(0),[Time].[YSQMD])&lt;br&gt;
:&lt;br&gt;
LinkMember([Time].[Current Day].[CurrentDayInd].&amp;amp;[1].Children.Item(0),[Time].[YSQMD]).Lag(30);
&lt;/p&gt;
&lt;p&gt;
I think that this solution is good and elegant. First of all, you don't have to use
external functions such as Now(). The second pro is that we use the native OLAP mechanism
which saves time and makes the queries run faster. Believe me, you'll feel the difference
with big cubes. The last thing is that this solution is easy to understand (at least
I think so) and it is easy for maintenance. The big con is that you have to process
this dimension (and related cubes) every day. I don't think that it's so bad because
most of the organizations do make process every day.
&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=2efa7c5b-826e-43c4-af42-5608fdd6c188" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,2efa7c5b-826e-43c4-af42-5608fdd6c188.aspx</comments>
      <category>BI;BI/DataWarehousing;BI/MDX;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services;BI/SQL Server 2008;BI/SQL Server 2008/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=a1c55658-cbf1-439d-88cc-d63ac1e2ba65</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,a1c55658-cbf1-439d-88cc-d63ac1e2ba65.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,a1c55658-cbf1-439d-88cc-d63ac1e2ba65.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=a1c55658-cbf1-439d-88cc-d63ac1e2ba65</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
As many of you already know, installation on Microsoft Excel on the SSAS 2005 server
is needed in order to use Excel functions in MDX. That's very helpful because MDX
is lack of many important functions such as Round (!). Many organizations don't like
it at all, but here's something that may help. In the SSAS 2005 server you don't need
to install the whole program, only the .Net programmability support. In the installation,
choose to manually pick up which components you wish to install and then
choose the .Net programmability Support as seen in the picture:
</p>
        <p>
          <img src="http://www.miky-schreiber.com/Blog/content/binary/excelProgSupport.GIF" border="0" />
        </p>
        <p>
Notice that this issue <a href="http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=124864">will
not be fixed in SSAS 2008</a>, so this tip will be relevant for a long time.
</p>
        <img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=a1c55658-cbf1-439d-88cc-d63ac1e2ba65" />
      </body>
      <title>Excel in the SSAS 2005/8 Server</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,a1c55658-cbf1-439d-88cc-d63ac1e2ba65.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,a1c55658-cbf1-439d-88cc-d63ac1e2ba65.aspx</link>
      <pubDate>Mon, 31 Dec 2007 08:06:00 GMT</pubDate>
      <description>&lt;p&gt;
As many of you already know, installation on Microsoft Excel on the SSAS 2005&amp;nbsp;server
is needed in order to use Excel functions in MDX. That's very helpful because MDX
is lack of many important functions such as Round (!). Many organizations don't like
it at all, but here's something that may help. In the SSAS 2005 server you don't need
to install the whole program, only the .Net programmability support. In the installation,
choose to manually&amp;nbsp;pick up&amp;nbsp;which components you wish to install and then
choose the .Net programmability Support as seen in the picture:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.miky-schreiber.com/Blog/content/binary/excelProgSupport.GIF" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Notice that this issue &lt;a href="http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=124864"&gt;will
not be fixed in SSAS 2008&lt;/a&gt;, so&amp;nbsp;this tip&amp;nbsp;will be relevant for a long time.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=a1c55658-cbf1-439d-88cc-d63ac1e2ba65" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,a1c55658-cbf1-439d-88cc-d63ac1e2ba65.aspx</comments>
      <category>BI;BI/MDX;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services;BI/SQL Server 2008;BI/SQL Server 2008/Analysis Services</category>
    </item>
  </channel>
</rss>