<?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 2005|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=fd39d7a9-4217-449b-ae66-f0a582eed50a</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,fd39d7a9-4217-449b-ae66-f0a582eed50a.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,fd39d7a9-4217-449b-ae66-f0a582eed50a.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=fd39d7a9-4217-449b-ae66-f0a582eed50a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
For documentation purposes: When you get "Unexpected error occured: Error in Application"
error in SSAS while trying to view the cube's calculations tab, you'll need to close
BIDS and <a href="http://www.bronios.com/index.php/2007/06/13/unexpected-error-occured-viewing-calculations-tab-for-ssas-project">do
some file copy tasks</a>.
</p>
        <img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=fd39d7a9-4217-449b-ae66-f0a582eed50a" />
      </body>
      <title>Unexpected Error when viewing Calculations in SSAS</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,fd39d7a9-4217-449b-ae66-f0a582eed50a.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,fd39d7a9-4217-449b-ae66-f0a582eed50a.aspx</link>
      <pubDate>Mon, 04 Jan 2010 09:22:08 GMT</pubDate>
      <description>&lt;p&gt;
For documentation purposes: When you get "Unexpected error occured: Error in Application"
error in SSAS while trying to view the cube's calculations tab, you'll need to close
BIDS and &lt;a href="http://www.bronios.com/index.php/2007/06/13/unexpected-error-occured-viewing-calculations-tab-for-ssas-project"&gt;do
some file copy tasks&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=fd39d7a9-4217-449b-ae66-f0a582eed50a" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,fd39d7a9-4217-449b-ae66-f0a582eed50a.aspx</comments>
      <category>BI;BI/SQL Server 2005;BI/SQL Server 2005/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=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=d2331638-e60a-45c7-9f5b-8becf2483179</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,d2331638-e60a-45c7-9f5b-8becf2483179.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,d2331638-e60a-45c7-9f5b-8becf2483179.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=d2331638-e60a-45c7-9f5b-8becf2483179</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In the previous parts (<a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,bd657303-2777-4d14-94bb-2aafce915ff3.aspx">1</a>, <a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,d6688032-fdd3-46a7-aff9-bf647b069535.aspx">2</a>) I
showed how to connect Informatica with MS-OLAP, meaning that a mapplet can process
cube or dimension. The thing is that I focused on the side of MS-OLAP. In the second
part I even wrote the T-SQL code itself. Now I want to close the loop by describing
what's going on in the Informatica side. This part was made by my friend, Alex, who
permitted me to post here about what he did.
</p>
        <p>
First of all, there's a table which contains the parameters to call with to the MS-OLAP
procedure (object id, type, user name, etc.). This table is the source (&amp; source
qualifier, of course) of the mapplet. Each row in this table calls the stored procedure
in the MS-OLAP side (in fact, the procedure is part of the relational DB, but never
mind now). The call to the SP is made with Informatica's Procedure block. The connection
is a regular ODBC connection, as mentioned in the previous part. Now for the interesting
part: In the mapplet, the result of the procedure (zero for success, one for failure)
goes into a Java Transformation block. This java block will fail the mapplet if one
or more procedure calls returned failure.
</p>
        <p>
How to do this java block? Double click on it to enter its properties. Go to the "Java
Code" tab. There you'll see tab for every event in this block's life cycle. Here is
the code for every tab (only the relevant ones):
</p>
        <p>
Helper Code:
</p>
static int errorCounter = 0;<br />
static Object lock = new Object();<br /><p>
On Input Row:
</p>
if (returnValue != 0)<br />
{<br />
 synchronized(lock)<br />
  {<br />
   errorCounter++;<br />
  }<br />
}<br /><p>
On End of Data: 
</p><p>
synchronized(lock)<br />
{<br />
 if (errorCounter &gt; 0)<br />
  {<br />
   failSession("OLAP Objects failed");<br />
  }<br />
} 
</p><p>
Note that:
</p><ul><li>
I'm not sure that the lock mechanism is required here. sync, lock, semaphore, etc.
mechanisms are often used when atomic write is needed in order to solve problems
like deadlocks, mutual write, etc. Here I simply don't care. Even if two parallel
threads will read the errorCounter as zero and they both will increase it to one (when
in fact it needs to have the value of two) it won't be a bug because the session will
fail anyway. Alex &amp; I need to talk about this point...</li><li>
failSession is a function which is part of Informatica's API. As you might guess,
it will fail the whole mapplet.</li><li>
Very important: Calling all the MS-OLAP objects at once will cause an error in the
Analysis Services server and all the objects will be in the state of Unprocessed.
The Informatica side has to call the dimensions first and only then the cubes. The
cubes must not be called all at once if they have relationships between them. This
will cause deadlock too.<br /></li></ul><img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=d2331638-e60a-45c7-9f5b-8becf2483179" /></body>
      <title>Connecting Informatica with MS-OLAP - Part III</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,d2331638-e60a-45c7-9f5b-8becf2483179.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,d2331638-e60a-45c7-9f5b-8becf2483179.aspx</link>
      <pubDate>Mon, 07 Jan 2008 20:35:17 GMT</pubDate>
      <description>&lt;p&gt;
In the previous parts (&lt;a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,bd657303-2777-4d14-94bb-2aafce915ff3.aspx"&gt;1&lt;/a&gt;, &lt;a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,d6688032-fdd3-46a7-aff9-bf647b069535.aspx"&gt;2&lt;/a&gt;)&amp;nbsp;I
showed how to connect Informatica with MS-OLAP, meaning that a mapplet can process
cube or dimension. The thing is that I focused on the side of MS-OLAP. In the second
part I even&amp;nbsp;wrote the T-SQL code itself. Now I want to close the loop by describing
what's going on in the Informatica side. This part was made by my friend, Alex, who
permitted me to post here about what he did.
&lt;/p&gt;
&lt;p&gt;
First of all, there's a table which contains the parameters to call with to the MS-OLAP
procedure (object id, type, user name, etc.). This table is the source (&amp;amp; source
qualifier, of course) of the mapplet. Each row in this table calls the stored procedure
in the MS-OLAP side (in fact, the procedure is part of the relational DB, but never
mind now). The call to the SP is made with Informatica's Procedure block. The connection
is a regular ODBC connection, as mentioned in the previous part. Now for the interesting
part: In the mapplet, the result of the procedure (zero for success, one for failure)
goes into a Java Transformation block. This java block will fail the mapplet if one
or more procedure calls returned failure.
&lt;/p&gt;
&lt;p&gt;
How to do this java block? Double click on it to enter its properties. Go to the "Java
Code" tab. There you'll see tab for every event in this block's life cycle. Here is
the code for every tab (only the relevant ones):
&lt;/p&gt;
&lt;p&gt;
Helper Code:
&lt;/p&gt;
static int errorCounter = 0;&lt;br&gt;
static Object lock = new Object();&lt;br&gt;
&lt;p&gt;
On Input Row:
&lt;/p&gt;
if (returnValue != 0)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;synchronized(lock)&lt;br&gt;
&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;errorCounter++;&lt;br&gt;
&amp;nbsp;&amp;nbsp;}&lt;br&gt;
}&lt;br&gt;
&lt;p&gt;
On End of Data: 
&lt;p&gt;
synchronized(lock)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;if (errorCounter &amp;gt; 0)&lt;br&gt;
&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;failSession("OLAP Objects failed");&lt;br&gt;
&amp;nbsp;&amp;nbsp;}&lt;br&gt;
} 
&lt;/p&gt;
&lt;p&gt;
Note that:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
I'm not sure that the lock mechanism is required here. sync, lock, semaphore, etc.
mechanisms&amp;nbsp;are often used when atomic write is needed in order to solve problems
like deadlocks, mutual write, etc. Here I simply don't care. Even if two parallel
threads will read the errorCounter as zero and they both will increase it to one (when
in fact it needs to have the value of two) it won't be a bug because the session will
fail anyway. Alex &amp;amp; I need to talk about this point...&lt;/li&gt;
&lt;li&gt;
failSession is a function which is part of Informatica's API. As you might guess,
it will fail the whole mapplet.&lt;/li&gt;
&lt;li&gt;
Very important: Calling all the MS-OLAP objects at once will cause an error in the
Analysis Services server and all the objects will be in the state of Unprocessed.
The Informatica side has to call the dimensions first and only then the cubes. The
cubes must not be called all at once if they have relationships between them. This
will cause deadlock too.&lt;br&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=d2331638-e60a-45c7-9f5b-8becf2483179" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,d2331638-e60a-45c7-9f5b-8becf2483179.aspx</comments>
      <category>BI;BI/Informatica;BI/SQL Server 2005;BI/SQL Server 2005/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>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=e6cf2530-a4e4-4f9b-bff7-f7be5f470506</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,e6cf2530-a4e4-4f9b-bff7-f7be5f470506.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,e6cf2530-a4e4-4f9b-bff7-f7be5f470506.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=e6cf2530-a4e4-4f9b-bff7-f7be5f470506</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Last week I participated in Microsoft's BI conference in Ra'anana, Israel. After the
conference I asked myself: What have I really learned today? Well, here is what I
remember:
</p>
        <ul>
          <li>
Microsoft figured out that the eternal BI tool is and will be Excel. People just love
their Excel sheets and they will stay there. This is why the mission is to bring the
BI into their Excel sheets. Their new product - Excel Services, will manage our excel
sheets in one central place which is connected to our Analysis Services cubes. 
</li>
          <li>
In my point of view, SQL Server 2008 is just a bunch of many performance issues and
it is not really a new product. There are a lot of new "performance features". For
example, most of our MDX queries will run faster, especially those who has null cells.
The new Cell-By-Cell calculations performance improvements will cause these queries
to run faster. I think that SS2008 could be one big Service Pack. If I'm wrong, please
do comment me. 
</li>
          <li>
SQL Server 2005 has many products that we don't know good enough. Some products that
I need to learn about are: Replication, SQL Server Agent, SQL CLR and more. I do know
what they do and even played with them a little bit, but I want to know how they can
help me and improve my work. 
</li>
          <li>
Many new features in SS2008 come from two old sources: <a href="http://www.codeplex.com/bidshelper">BIDS
Helper</a> (SSAS open source addin) and of-course, Oracle... 
</li>
          <li>
My big wish - IntelliSense for Analysis Services will not be in SSAS2008 and maybe
won't be at all. This is because the guessing is MDX is very hard. There are too many
options in every statement you write. 
</li>
          <li>
We won't need to upgrade to Office 2007 in order to use Excel Services. Only the developers
will need it.</li>
        </ul>
        <p>
This is what I remember for now. I'll update this post if something new will come
around in my mind.
</p>
        <img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=e6cf2530-a4e4-4f9b-bff7-f7be5f470506" />
      </body>
      <title>Reviews from Microsoft BI Conference</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,e6cf2530-a4e4-4f9b-bff7-f7be5f470506.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,e6cf2530-a4e4-4f9b-bff7-f7be5f470506.aspx</link>
      <pubDate>Sun, 09 Dec 2007 12:26:17 GMT</pubDate>
      <description>&lt;p&gt;
Last week I participated in Microsoft's BI conference in Ra'anana, Israel. After the
conference I asked myself: What have I really learned today? Well, here is what I
remember:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Microsoft figured out that the eternal BI tool is and will be Excel. People just love
their Excel sheets and they will stay there. This is why the mission is to bring the
BI into their Excel sheets. Their new product - Excel Services, will manage our excel
sheets in one central place which is connected to our Analysis Services cubes. 
&lt;li&gt;
In my point of view, SQL Server 2008 is just a bunch of many performance issues and
it is not really a new product. There are a lot of new "performance features". For
example, most of our MDX queries will run faster, especially those who has null cells.
The new Cell-By-Cell calculations performance improvements will cause these queries
to run faster. I think that SS2008 could be one big Service Pack. If I'm wrong, please
do comment me. 
&lt;li&gt;
SQL Server 2005 has many products that we don't know good enough. Some products that
I need to learn about are: Replication, SQL Server Agent, SQL CLR and more. I do know
what they do and even played with them a little bit, but I want to know how they can
help me and improve my work. 
&lt;li&gt;
Many new features in SS2008 come from two old sources: &lt;a href="http://www.codeplex.com/bidshelper"&gt;BIDS
Helper&lt;/a&gt; (SSAS open source addin) and of-course, Oracle... 
&lt;li&gt;
My big wish - IntelliSense for Analysis Services will not be in SSAS2008 and maybe
won't be at all. This is because the guessing is MDX is very hard. There are too many
options in every statement you write. 
&lt;li&gt;
We won't need to upgrade to Office 2007 in order to use Excel Services. Only the developers
will need it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
This is what I remember for now. I'll update this post if something new will come
around in my mind.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=e6cf2530-a4e4-4f9b-bff7-f7be5f470506" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,e6cf2530-a4e4-4f9b-bff7-f7be5f470506.aspx</comments>
      <category>BI;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services;BI/SQL Server 2008</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=d6688032-fdd3-46a7-aff9-bf647b069535</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,d6688032-fdd3-46a7-aff9-bf647b069535.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,d6688032-fdd3-46a7-aff9-bf647b069535.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=d6688032-fdd3-46a7-aff9-bf647b069535</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <title>Connecting Informatica with MS-OLAP - Part II</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,d6688032-fdd3-46a7-aff9-bf647b069535.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,d6688032-fdd3-46a7-aff9-bf647b069535.aspx</link>
      <pubDate>Sun, 02 Dec 2007 08:59:42 GMT</pubDate>
      <description>&lt;p&gt;
In the &lt;a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,bd657303-2777-4d14-94bb-2aafce915ff3.aspx"&gt;last
post&lt;/a&gt;, I explained the architecture of our BI project. The final part of the process
is processing MS-OLAP object (cube/dimension) from Informatica mapplet. As explained
earlier, the trick is to call Stored Procedure from the Informatica server. But first
there is one more thing to do: How do you connect the Informatica server (Linux) with
MS-OLAP (windows server)?
&lt;/p&gt;
&lt;p&gt;
Informatica ships with number of drivers that can connect it with other servers. The
drivers are called DataDirect and I'll discuss 4.20. You need to define this driver
on the Informatica server (look in Informatica knowledge base for more information).
This is an easy thing to do. Notice that you have to enter a full server name (including
domain) and the password. Remember that if you'll change the password in the future
the process will fail. You have to enable the protocol named "Named Pipes" in the
MS-OLAP server. How to do this? Enter the Configuration Manager in the MS-OLAP server
and in the section of MSSQLSERVER protocols enable the Named Pipes protocol. This
will enable the connection from the Informatica server. On the Informatica server,
make a regular ODBC connection.
&lt;/p&gt;
&lt;p&gt;
Here is the code of the SP on the MS-OLAP side. This SP must be on the msdb Database
on the Database engine.
&lt;/p&gt;
&lt;p&gt;
ALTER PROCEDURE [dbo].[ProcessObject]&lt;br&gt;
@databaseId varchar(100),&lt;br&gt;
@objectType varchar(100),&lt;br&gt;
@objectId varchar(100),&lt;br&gt;
@login_name varchar(100),&lt;br&gt;
@returnValue int output,&lt;br&gt;
@errorMessage nvarchar(1024) output&lt;br&gt;
AS&lt;br&gt;
BEGIN&lt;br&gt;
declare @jobName varchar(200)&lt;br&gt;
declare @xmla varchar(1000)&lt;br&gt;
declare @jobId binary(16)&lt;br&gt;
declare @ReturnCode int&lt;br&gt;
declare @stop int&lt;br&gt;
&lt;br&gt;
--Set job name&lt;br&gt;
set @jobName = 'Process' + @objectType + '_' + @objectId&lt;br&gt;
&lt;br&gt;
--Delete the job if already exists&lt;br&gt;
if exists (select * from msdb.dbo.sysjobs where name = @jobName)&lt;br&gt;
exec msdb.dbo.sp_delete_job @job_name = @jobName&lt;br&gt;
&lt;br&gt;
--Create the job&lt;br&gt;
Exec msdb.dbo.sp_add_job @job_name=@jobName&lt;br&gt;
@enabled=1,&lt;br&gt;
@notify_level_eventlog=0,&lt;br&gt;
@notify_level_email=0,&lt;br&gt;
@notify_level_netsend=0,&lt;br&gt;
@notify_level_page=0,&lt;br&gt;
@delete_level=0,&lt;br&gt;
@description=N'process OLAP object',&lt;br&gt;
@category_name=N'[Uncategorized (Local)]',&lt;br&gt;
@owner_login_name=@login_name, @job_id=@jobId output&lt;br&gt;
&lt;br&gt;
exec msdb.dbo.sp_add_jobserver @job_name=@jobName, @server_name=@@SERVERNAME&lt;br&gt;
&lt;br&gt;
--Declare XMLA for OLAP object&lt;br&gt;
if (@objectType = 'Cube')&lt;br&gt;
set @xmla = '&lt;PROCESS xmlns="http://schemas.microsoft.com/analysisservices/2003/engine"&gt;
&lt;br&gt;
&lt;object&gt;
&lt;br&gt;
&lt;DatabaseID&gt;
' + @dataBaseId + '
&lt;/DatabaseID&gt;
&lt;br&gt;
&lt;CubeID&gt;
' + @objectId + '
&lt;/CubeID&gt;
&lt;br&gt;
&lt;/object&gt;
&lt;br&gt;
&lt;TYPE&gt;
ProcessFull
&lt;/TYPE&gt;
&lt;br&gt;
&lt;/PROCESS&gt;
'&lt;br&gt;
else if (@objectType = 'Dim')&lt;br&gt;
set @xmla = 
&lt;BATCH xmlns="http://schemas.microsoft.com/analysisservices/2003/engine"&gt;
&lt;br&gt;
&lt;PARALLEL&gt;
&lt;br&gt;
&lt;PROCESS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;br&gt;
&lt;object&gt;
&lt;br&gt;
&lt;DatabaseID&gt;
' + @dataBaseId + '
&lt;/DataBaseID&gt;
&lt;br&gt;
&lt;DimensionID&gt;
' + @objectId + '
&lt;/DimensionID&gt;
&lt;br&gt;
&lt;/object&gt;
&lt;br&gt;
&lt;TYPE&gt;
ProcessFull
&lt;/TYPE&gt;
&lt;br&gt;
&lt;/PROCESS&gt;
&lt;br&gt;
&lt;/PARALLEL&gt;
&lt;br&gt;
&lt;/BATCH&gt;
'&lt;br&gt;
else&lt;br&gt;
Begin&lt;br&gt;
set @returnValue = 0&lt;br&gt;
return @returnValue&lt;br&gt;
End&lt;br&gt;
&lt;br&gt;
--Add the job step&lt;br&gt;
Exec msdb.dbo.sp_add_jobstep @job_id=@jobId, @step_name=N'Process Object',&lt;br&gt;
@step_id=1,&lt;br&gt;
@cmdexec_success_code=0,&lt;br&gt;
@on_success_action=1,&lt;br&gt;
@on_success_step_id=0,&lt;br&gt;
@on_fail_action=2,&lt;br&gt;
@on_fail_step_id=0,&lt;br&gt;
@retry_attempts=0,&lt;br&gt;
@retry_interval=0,&lt;br&gt;
@os_run_priority=0, @subsystem=N'ANALYSISCOMMAND',&lt;br&gt;
@command=@xmla,&lt;br&gt;
@server=@@SERVERNAME,&lt;br&gt;
@database_name=N'master',&lt;br&gt;
@flags=0&lt;br&gt;
&lt;br&gt;
--Run the job&lt;br&gt;
Execute sp_start_job @jobName&lt;br&gt;
&lt;br&gt;
Waitfor delay '00:00:05'&lt;br&gt;
set @returnValue = (select run_status from dbo.sysjobhistory&lt;br&gt;
where job_id = @jobId&lt;br&gt;
and step_id = 1)&lt;br&gt;
&lt;br&gt;
-- Loop until the job ends and return its result&lt;br&gt;
set @stop = 0&lt;br&gt;
if @returnValue is null&lt;br&gt;
while @stop &amp;lt;&amp;gt; 1&lt;br&gt;
Begin&lt;br&gt;
set @returnValue = (select run_status from dbo.sysjobhistory&lt;br&gt;
where job_id = @jobId&lt;br&gt;
and step_id = 1)&lt;br&gt;
&lt;br&gt;
if @returnValue is not null&lt;br&gt;
set @stop = 1&lt;br&gt;
&lt;br&gt;
waitfor delay '00:00:10'&lt;br&gt;
End&lt;br&gt;
&lt;br&gt;
--Return error message (if exists)&lt;br&gt;
If @returnValue = 0 --failed&lt;br&gt;
set @errorMessage = (select [message] from dbo.sysjobhistory&lt;br&gt;
where job_id = @jobId&lt;br&gt;
and step_id = 1)&lt;br&gt;
End
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#ff0000&gt;&lt;u&gt;update:&lt;/u&gt; &lt;/font&gt;&lt;font color=#000000&gt;I see that the xmla
code went bad in the post because it is not recognised html code. It doesn't matter,
I believe you got the point...&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=d6688032-fdd3-46a7-aff9-bf647b069535" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,d6688032-fdd3-46a7-aff9-bf647b069535.aspx</comments>
      <category>BI;BI/Informatica;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=bd657303-2777-4d14-94bb-2aafce915ff3</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,bd657303-2777-4d14-94bb-2aafce915ff3.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,bd657303-2777-4d14-94bb-2aafce915ff3.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=bd657303-2777-4d14-94bb-2aafce915ff3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In the past I mentioned some fragments of the architecture of our end-to-end BI solution.
Now I'll discuss how it is done. I will only write about the things that I done (I
mean, developed) but I'll describe the whole picture.
</p>
        <p>
Our architecture goes like this: <a href="http://en.wikipedia.org/wiki/CONTROL-M">Control
M</a> -&gt; Informatica -&gt; MS-OLAP (Analysis Services 2005).
</p>
        <p>
In words: ControlM is the most common scheduler in big companies. We use it to schedule
our ETL processes in Informatica. Our system team made it possible to start Informatica
processes from ControlM. I don't know exactly how it is done. All I know is that ControlM
raises a flag in a table, and Informatica scans the table every X seconds and start
the process if it finds the flag that was raised by ControlM. Don't ask me about the
technical details - it wasn't my job.
</p>
        <p>
The more interesting thing (because I did it...) is how Informatica calls MS-OLAP
and tells it to process a cube. In this part I'll describe the big picture and in
the next one I'll give some of the code and discuss some technical views of the
process. First, the Informatica mapping moves the data from the source to the
target, which is the dimension or fact table just like it always does. After that,
Informatica calls a Stored Procedure on the MS-OLAP server which process the cube.
Informatica calls this SP with some parameters, including the object type to process
(cube/dimension), its ID and some more parameters. In return, the MS-OLAP returns
return code (in order to point whether the process succeeded) and message describing
the error if it occurred.
</p>
        <p>
How the SP process the cube/dimension? Unfortunately, there is no SP that can process
OLAP object so I needed to use the following steps in my SP:
</p>
        <ol>
          <li>
Delete any existing job that does the same action (read on, you'll understand)</li>
          <li>
Create an empty job</li>
          <li>
Add a step to that job that will process the object. This step contains XMLA code
that contains the parameters that were given from Informatica</li>
          <li>
Run the job</li>
          <li>
Loop until the job (or process) ends and send back the return code and the error message,
if exists.</li>
        </ol>
        <p>
In the next part I'll write some of the code and discuss some technical issues.
</p>
        <p>
 
</p>
        <img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=bd657303-2777-4d14-94bb-2aafce915ff3" />
      </body>
      <title>Connecting Informatica with MS-OLAP - Part I</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,bd657303-2777-4d14-94bb-2aafce915ff3.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,bd657303-2777-4d14-94bb-2aafce915ff3.aspx</link>
      <pubDate>Sat, 01 Dec 2007 20:19:47 GMT</pubDate>
      <description>&lt;p&gt;
In the past I mentioned some fragments of the architecture of our end-to-end BI solution.
Now I'll discuss how it is done. I will only write about the things that I done (I
mean, developed) but I'll describe the whole picture.
&lt;/p&gt;
&lt;p&gt;
Our architecture goes like this: &lt;a href="http://en.wikipedia.org/wiki/CONTROL-M"&gt;Control
M&lt;/a&gt; -&amp;gt; Informatica -&amp;gt; MS-OLAP (Analysis Services 2005).
&lt;/p&gt;
&lt;p&gt;
In words: ControlM is the most common scheduler in big companies. We use it to schedule
our ETL processes in Informatica. Our system team made it possible to start Informatica
processes from ControlM. I don't know exactly how it is done. All I know is that ControlM
raises a flag in a table, and Informatica scans the table every X seconds and start
the process if it finds the flag that was raised by ControlM. Don't ask me about the
technical details - it wasn't my job.
&lt;/p&gt;
&lt;p&gt;
The more interesting thing (because I did it...) is how Informatica calls MS-OLAP
and tells it to process a cube. In this part I'll describe the big picture and in
the next one I'll give some of the code and discuss some technical&amp;nbsp;views of the
process.&amp;nbsp;First, the Informatica mapping moves the data from the source to the
target, which is the dimension or fact table just like it always does. After that,
Informatica calls a Stored Procedure on the MS-OLAP server which process the cube.
Informatica calls this SP with some parameters, including the object type to process
(cube/dimension), its ID and some more parameters. In return, the MS-OLAP returns
return code (in order to point whether the process succeeded) and message describing
the error if it occurred.
&lt;/p&gt;
&lt;p&gt;
How the SP process the cube/dimension? Unfortunately, there is no SP that can process
OLAP object so I needed to use the following steps in my SP:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Delete any existing job that does the same action (read on, you'll understand)&lt;/li&gt;
&lt;li&gt;
Create an empty job&lt;/li&gt;
&lt;li&gt;
Add a step to that job that will process the object. This step contains XMLA code
that contains the parameters that were given from Informatica&lt;/li&gt;
&lt;li&gt;
Run the job&lt;/li&gt;
&lt;li&gt;
Loop until the job (or process) ends and send back the return code and the error message,
if exists.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
In the next part I'll write some of the code and discuss some technical issues.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=bd657303-2777-4d14-94bb-2aafce915ff3" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,bd657303-2777-4d14-94bb-2aafce915ff3.aspx</comments>
      <category>BI;BI/Informatica;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=06e8e7c8-0dab-47f2-aa87-a19e7907675f</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,06e8e7c8-0dab-47f2-aa87-a19e7907675f.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,06e8e7c8-0dab-47f2-aa87-a19e7907675f.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=06e8e7c8-0dab-47f2-aa87-a19e7907675f</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">After our first MS-OLAP first installation,
I started asking myself some questions: The way we moved our cubes to the production
server is by the Visual Studio. We just deployed the cubes into the production server.
The problem was that we forgot that we had some changes done in the XMLA code that
lies behind one of our cubes. That caused some troubles in the installation and the
result was that we did some changes in the XMLA script in the production server <b>after
the installation</b>...<br />
So, how we should make the installation? Should we export the whole database and import
it in the production server, or should we generate XMLA scripts and run it in the
production server? Is there really a difference between these choices? 
<br />
If someone has an answer I would be very happy to read it. Thanks...<br /><p></p><img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=06e8e7c8-0dab-47f2-aa87-a19e7907675f" /></body>
      <title>Question about installation of SSAS 2005 cubes</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,06e8e7c8-0dab-47f2-aa87-a19e7907675f.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,06e8e7c8-0dab-47f2-aa87-a19e7907675f.aspx</link>
      <pubDate>Tue, 06 Nov 2007 19:17:55 GMT</pubDate>
      <description>After our first MS-OLAP first installation, I started asking myself some questions: The way we moved our cubes to the production server is by the Visual Studio. We just deployed the cubes into the production server. The problem was that we forgot that we had some changes done in the XMLA code that lies behind one of our cubes. That caused some troubles in the installation and the result was that we did some changes in the XMLA script in the production server &lt;b&gt;after
the installation&lt;/b&gt;...&lt;br&gt;
So, how we should make the installation? Should we export the whole database and import
it in the production server, or should we generate XMLA scripts and run it in the
production server? Is there really a difference between these choices? 
&lt;br&gt;
If someone has an answer I would be very happy to read it. Thanks...&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=06e8e7c8-0dab-47f2-aa87-a19e7907675f" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,06e8e7c8-0dab-47f2-aa87-a19e7907675f.aspx</comments>
      <category>BI;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=007d23dd-cf72-4096-8130-6bc2a0cc1783</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,007d23dd-cf72-4096-8130-6bc2a0cc1783.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,007d23dd-cf72-4096-8130-6bc2a0cc1783.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=007d23dd-cf72-4096-8130-6bc2a0cc1783</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
As you can see from the title, we use VSS with AS 2005. The reason for this is that
we want to have backup and source control in our AS projects. There are some interesting
points when working that way which I would like to share:
</p>
        <ul>
          <li>
When you process a cube in a VSS-contolled AS project, the compiler writes the exact
time and hour of the last process in the .database file in the solution. This file
is a small and simple XML file. This piece of data is written in the &lt;LastProcessed&gt;
element. That is the reason why VSS will ask to check-out this file every time you
will process a cube. You can ignore it and cancel it twice and the cube will be processed
anyway. Of course, the last processing time will not be correct.</li>
          <li>
The .dwproj file is the binder of the solution (as in regular code project). That
means that Visual Studio will update this file every time you add, delete or rename an
object to the solutions. When two (or more) developers doing these king of actions
together it will cause a disaster. Only the objects of the developer who checked-in
last will be saved in the project. What you need to do is <strong>manually</strong> edit
this file and add the object's elements yourself. That's not very hard, but you'll
need to concentrate. As always, I recommend using Notepad++.</li>
          <li>
When editing the .cube file yourself (when merging manually after two developers worked
on the same cube), make sure that the dimensions ID's in the .cube file match
the ID in the .dim files.</li>
          <li>
AS projects can be easily destroyed because of an error in a VSS-related decision.
Think twice when clicking in its annoying dialog boxes. Make a label every day after
building, deploying and processing the project.</li>
        </ul>
        <img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=007d23dd-cf72-4096-8130-6bc2a0cc1783" />
      </body>
      <title>Working with Visual SourceSafe and Analysis Services 2005</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,007d23dd-cf72-4096-8130-6bc2a0cc1783.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,007d23dd-cf72-4096-8130-6bc2a0cc1783.aspx</link>
      <pubDate>Mon, 29 Oct 2007 19:03:45 GMT</pubDate>
      <description>&lt;p&gt;
As you can see from the title, we use VSS with AS 2005. The reason for this is that
we want to have backup and source control in our AS projects. There are some interesting
points when working that way which I would like to share:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
When you process a cube in a VSS-contolled AS project, the compiler writes the exact
time and hour of the last process in the .database file in the solution. This file
is a small and simple XML file. This&amp;nbsp;piece of data is written in the &amp;lt;LastProcessed&amp;gt;
element. That is the reason why VSS will ask to check-out this file every time you
will process a cube. You can ignore it and cancel it twice and the cube will be processed
anyway. Of course, the last processing time will not be correct.&lt;/li&gt;
&lt;li&gt;
The .dwproj file is the binder of the solution (as in regular code project). That
means that Visual Studio will update this file every time you add, delete or rename&amp;nbsp;an
object to the solutions. When two (or more) developers doing these king of actions
together it will cause a disaster. Only the objects of the developer who checked-in
last will be saved in the project. What you need to do is &lt;strong&gt;manually&lt;/strong&gt; edit
this file and add the object's elements yourself. That's not very hard, but you'll
need to concentrate. As always, I recommend using Notepad++.&lt;/li&gt;
&lt;li&gt;
When editing the .cube file yourself (when merging manually after two developers worked
on the same cube), make sure that the&amp;nbsp;dimensions ID's in the .cube file match
the ID in the .dim files.&lt;/li&gt;
&lt;li&gt;
AS projects can be easily destroyed because of an error in a VSS-related decision.
Think twice when clicking in its annoying dialog boxes. Make a label every day after
building, deploying and processing the project.&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=007d23dd-cf72-4096-8130-6bc2a0cc1783" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,007d23dd-cf72-4096-8130-6bc2a0cc1783.aspx</comments>
      <category>BI;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=b661daf6-f808-4406-9731-6391d9552b2b</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,b661daf6-f808-4406-9731-6391d9552b2b.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,b661daf6-f808-4406-9731-6391d9552b2b.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=b661daf6-f808-4406-9731-6391d9552b2b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
We use VSS with Analysis Services 2005 in order to have source control and backup
(I think this deserves a post of its own). We've been shocked to find out that our
VSS didn't save our labes and our versions. The defect we experienced is that after
clicking on the history button and then on the OK button in the "choose date range"
dialog box, nothing happened. We were sure that no history was saved and that is the
reason that nothing happened. After a long search in the web, I found <a href="http://forums.microsoft.com/msdn/showpost.aspx?postid=124591&amp;siteid=1&amp;sb=0&amp;d=1&amp;at=7&amp;ft=11&amp;tf=0&amp;pageid=1">this
thread</a> in the MSDN. The problem is a bug in VSS that has something to do with
dates representation in Microsoft's code. The workaround is easy, but it seems to
work only in Windows 2000: Open the VSS admin program, then Options -&gt; Tools -&gt;
TimeZone, and set the time zone as none. That's it.
</p>
        <p>
By the way, notice that my <a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,229185d7-e921-482c-92b8-d73f51353375.aspx">second
post</a> in my blog was about date formats and how tricky and dangerous they can be.
</p>
        <img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=b661daf6-f808-4406-9731-6391d9552b2b" />
      </body>
      <title>Visual SourceSafe history bug</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,b661daf6-f808-4406-9731-6391d9552b2b.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,b661daf6-f808-4406-9731-6391d9552b2b.aspx</link>
      <pubDate>Mon, 29 Oct 2007 18:43:05 GMT</pubDate>
      <description>&lt;p&gt;
We use VSS with Analysis Services 2005 in order to have source control and backup
(I think this deserves a post of its own). We've been shocked to find out that our
VSS didn't save our labes and our versions. The defect we experienced is that after
clicking on the history button and then on the OK button in the "choose date range"
dialog box, nothing happened. We were sure that no history was saved and that is the
reason that nothing happened. After a long search in the web, I found &lt;a href="http://forums.microsoft.com/msdn/showpost.aspx?postid=124591&amp;amp;siteid=1&amp;amp;sb=0&amp;amp;d=1&amp;amp;at=7&amp;amp;ft=11&amp;amp;tf=0&amp;amp;pageid=1"&gt;this
thread&lt;/a&gt; in the MSDN. The problem is a bug in VSS that has something to do with
dates representation in Microsoft's code. The workaround is easy, but it seems to
work only in Windows 2000: Open the VSS admin program, then Options -&amp;gt; Tools -&amp;gt;
TimeZone, and set the time zone as none. That's it.
&lt;/p&gt;
&lt;p&gt;
By the way, notice that my &lt;a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,229185d7-e921-482c-92b8-d73f51353375.aspx"&gt;second
post&lt;/a&gt; in my blog was about date formats and how tricky and dangerous they can be.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=b661daf6-f808-4406-9731-6391d9552b2b" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,b661daf6-f808-4406-9731-6391d9552b2b.aspx</comments>
      <category>BI;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=dc7a85be-591a-42b6-83c9-4d6c5ef2d8ea</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,dc7a85be-591a-42b6-83c9-4d6c5ef2d8ea.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,dc7a85be-591a-42b6-83c9-4d6c5ef2d8ea.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=dc7a85be-591a-42b6-83c9-4d6c5ef2d8ea</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This is the second bug I found when working with AS and Oracle as my database (you
can read about the first one <a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,e36d9c69-b16d-4d4b-bea9-05e3a5d02729.aspx">here</a>).
Some background about our Datawarehouse architecture before I begin to complain about
Microsoft:
</p>
        <p>
We cannot afford risking that our users will experience faults or crashes while
we refresh our DWH, process our cubes, etc. What we do to solve this problem is called
a switch: We have two schemas in our Oracle DB. While our users watch the first schema,
we update the other one. Only after we finish all our load process, we switch our
user's tools to see the data from the second schema. In order to implement this architecture
we use Oracle's synonyms. Let's say that the users watch the fact table "sales". We
have a synonym which is called sales_syn. While it's pointing to the first schema
(schema_a.sales_fact), we're loading into the second schema (schema_b.sales_fact).
After that, we switch the synonym so it will point to the second schema (schema_b).
The users always look on views that rely on synonyms. The views never change, only
the synonyms do.
</p>
        <p>
The problem starts when we make Named Queries in our Data Source Views in AS. Apparently,
AS looks inside the view that we enterd into the DSV, finds the target of the
synonym and saves it. Even after we make the switch (the synonym points on the other
schema), the named query will be pointing on the first one. All our efforts
to edit the named query have failed. When we open it again, we will always find that
the first schema is "burned" there and cannot be changed.
</p>
        <p>
The solution we chose is simply avoid using named queries. If we need a simple calculation
we can add a Named Calculation in the Data Source View and if we need a complex view
over our fact table, we write it ourself in the DB. This solutions breaks a little
bit the main point of the data source view (designated place for all the logic of
the DWH), but it is the best solution we could think of right now.
</p>
        <p>
Dear Microsoft developers - it seems that you tried to be smart and look into our
Oracle objects in order to enhance the multidimensional database's performance.
Next time, please think twice before you do.
</p>
        <img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=dc7a85be-591a-42b6-83c9-4d6c5ef2d8ea" />
      </body>
      <title>Analysis Services Named Queries and Oracle's synonyms serious bug</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,dc7a85be-591a-42b6-83c9-4d6c5ef2d8ea.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,dc7a85be-591a-42b6-83c9-4d6c5ef2d8ea.aspx</link>
      <pubDate>Mon, 29 Oct 2007 18:24:36 GMT</pubDate>
      <description>&lt;p&gt;
This is the second bug I found when working with AS and Oracle as my database (you
can read about the first one &lt;a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,e36d9c69-b16d-4d4b-bea9-05e3a5d02729.aspx"&gt;here&lt;/a&gt;).
Some background about our Datawarehouse architecture before I begin to complain about
Microsoft:
&lt;/p&gt;
&lt;p&gt;
We cannot afford risking that our&amp;nbsp;users will experience faults or crashes&amp;nbsp;while
we refresh our DWH, process our cubes, etc. What we do to solve this problem is called
a switch: We have two schemas in our Oracle DB. While our users watch the first schema,
we update the other one. Only after we finish all our load process, we switch our
user's tools to see the data from the second schema. In order to implement this architecture
we use Oracle's synonyms. Let's say that the users watch the fact table "sales". We
have a synonym which is called sales_syn. While it's pointing to the first schema
(schema_a.sales_fact), we're loading into the second schema (schema_b.sales_fact).
After that, we switch the synonym so it will point to the second schema (schema_b).
The users always look on views that rely on synonyms. The views never change, only
the synonyms do.
&lt;/p&gt;
&lt;p&gt;
The problem starts when we make Named Queries in our Data Source Views in AS. Apparently,
AS looks inside the view that&amp;nbsp;we enterd into the DSV, finds the target of the
synonym and saves it. Even after we make the switch (the synonym points on the other
schema), the named query will&amp;nbsp;be pointing&amp;nbsp;on the first one. All our efforts
to edit the named query have failed. When we open it again, we will always find that
the first schema is "burned" there and cannot be changed.
&lt;/p&gt;
&lt;p&gt;
The solution we chose is simply avoid using named queries. If we need a simple calculation
we can add a Named Calculation in the Data Source View and if we need a complex view
over our fact table, we write it ourself in the DB. This solutions breaks a little
bit the main point of the data source view (designated place for all the logic of
the DWH), but it is the best solution we could think of right now.
&lt;/p&gt;
&lt;p&gt;
Dear Microsoft developers - it seems that you tried to be smart and look into our
Oracle objects in order to enhance the&amp;nbsp;multidimensional database's&amp;nbsp;performance.
Next time, please think twice before you do.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=dc7a85be-591a-42b6-83c9-4d6c5ef2d8ea" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,dc7a85be-591a-42b6-83c9-4d6c5ef2d8ea.aspx</comments>
      <category>BI;BI/DataWarehousing;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=0ee6c819-dc0d-4801-a675-ceb967b17bb6</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,0ee6c819-dc0d-4801-a675-ceb967b17bb6.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,0ee6c819-dc0d-4801-a675-ceb967b17bb6.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=0ee6c819-dc0d-4801-a675-ceb967b17bb6</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">This post is about Panorama because it
is the UI tool I'm working with, but this can be made with every BI UI tool.<br /><br />
My customer wanted to get the effect shown by Analysis Services 2005 when browsing
a dimension (see the picture below). He wanted to see some properties of the members
shown in the rows, along with the usual measures. Unfortunately, Panorama (and I'm
sure that also other tools) does not have this option in the GIU. The solution is
this code:<br /><br />
Create Member CurrentCube.[Measures].[MyProperty] as<br />
  iif(IsLeaf([MyDimension].[MyHierarchy].CurrentMember),<br />
     [MyDimension].[MyHierarchy].CurrentMember.Properties("MyProperty"),<br />
     Null)<br /><br />
Note that declaring only the third row will cause that every member that is not a
leaf will cause an error, which is something we don't want the viewer to see. If the
dimension has properties for members in other levels too, you can adjust this decleration.
This member can be declared either in the DataBase's Script (after the CALCULATE expression)
or inside the session/query (not recommended in Panorama). Now, all you have to do
is to show the dimension's members in the rows and this new measure in the columns
(after or before the regular measures), and you'll get what you want.<br /><p></p><img src="http://www.miky-schreiber.com/Blog/content/binary/memberProperties.JPG" border="0" /><img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=0ee6c819-dc0d-4801-a675-ceb967b17bb6" /></body>
      <title>Showing Member Properties in Panorama</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,0ee6c819-dc0d-4801-a675-ceb967b17bb6.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,0ee6c819-dc0d-4801-a675-ceb967b17bb6.aspx</link>
      <pubDate>Sun, 30 Sep 2007 18:47:12 GMT</pubDate>
      <description>This post is about Panorama because it is the UI tool I'm working with, but this can be made with every BI UI tool.&lt;br&gt;
&lt;br&gt;
My customer wanted to get the effect shown by Analysis Services 2005 when browsing
a dimension (see the picture below). He wanted to see some properties of the members
shown in the rows, along with the usual measures. Unfortunately, Panorama (and I'm
sure that also other tools) does not have this option in the GIU. The solution is
this code:&lt;br&gt;
&lt;br&gt;
Create Member CurrentCube.[Measures].[MyProperty] as&lt;br&gt;
&amp;nbsp; iif(IsLeaf([MyDimension].[MyHierarchy].CurrentMember),&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MyDimension].[MyHierarchy].CurrentMember.Properties("MyProperty"),&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Null)&lt;br&gt;
&lt;br&gt;
Note that declaring only the third row will cause that every member that is not a
leaf will cause an error, which is something we don't want the viewer to see. If the
dimension has properties for members in other levels too, you can adjust this decleration.
This member can be declared either in the DataBase's Script (after the CALCULATE expression)
or inside the session/query (not recommended in Panorama). Now, all you have to do
is to show the dimension's members in the rows and this new measure in the columns
(after or before the regular measures), and you'll get what you want.&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img src="http://www.miky-schreiber.com/Blog/content/binary/memberProperties.JPG" border="0"&gt;&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=0ee6c819-dc0d-4801-a675-ceb967b17bb6" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,0ee6c819-dc0d-4801-a675-ceb967b17bb6.aspx</comments>
      <category>BI;BI/MDX;BI/Panorama;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=f0522178-c95d-46d6-81e5-0f753292b21f</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,f0522178-c95d-46d6-81e5-0f753292b21f.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,f0522178-c95d-46d6-81e5-0f753292b21f.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=f0522178-c95d-46d6-81e5-0f753292b21f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">When designing a dimension in Analysis
Services, there's a funny button called Add Business Intelligence. Clicking it opens
a beautiful wizard which letting you define some basic properties of the dimension
such as ordering and enabling writeback. I'll take the writeback feature as an example:
When doing this using the wizard, it's taking you through many screen where all you
have to do except for clicking next, next is to check a checkbox in one of the screens.
That's it. After that, all this long wizard doing it setting a property called WriteEnabled
to True. I think that it's a strange software design of Microsoft. Maybe it's for
making the product seem more professional. You know - Add Business Intelligence sounds
like a heavy operation. Anyway, I don't know what they had in mind.<p></p><div align="center"><img src="http://www.miky-schreiber.com/Blog/content/binary/addBI.JPG" border="0" />     <img src="http://www.miky-schreiber.com/Blog/content/binary/enableWriteback.JPG" border="0" /></div><img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=f0522178-c95d-46d6-81e5-0f753292b21f" /></body>
      <title>Add Business Intelligence?</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,f0522178-c95d-46d6-81e5-0f753292b21f.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,f0522178-c95d-46d6-81e5-0f753292b21f.aspx</link>
      <pubDate>Sat, 14 Jul 2007 21:48:56 GMT</pubDate>
      <description>When designing a dimension in Analysis Services, there's a funny button
called Add Business Intelligence. Clicking it opens a beautiful wizard
which letting you define some basic properties of the dimension such as
ordering and enabling writeback. I'll take the writeback feature as an
example: When doing this using the wizard, it's taking you through many
screen where all you have to do except for clicking next, next is to
check a checkbox in one of the screens. That's it. After that, all this
long wizard doing it setting a property called WriteEnabled to True. I
think that it's a strange software design of Microsoft. Maybe it's for
making the product seem more professional. You know - Add Business
Intelligence sounds like a heavy operation. Anyway, I don't know what
they had in mind.&lt;p&gt;
&lt;/p&gt;
&lt;div align="center"&gt;&lt;img src="http://www.miky-schreiber.com/Blog/content/binary/addBI.JPG" border="0"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;img src="http://www.miky-schreiber.com/Blog/content/binary/enableWriteback.JPG" border="0"&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=f0522178-c95d-46d6-81e5-0f753292b21f" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,f0522178-c95d-46d6-81e5-0f753292b21f.aspx</comments>
      <category>BI;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=a68059bf-fe59-48d5-a9e8-dd366e6a861c</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,a68059bf-fe59-48d5-a9e8-dd366e6a861c.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,a68059bf-fe59-48d5-a9e8-dd366e6a861c.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=a68059bf-fe59-48d5-a9e8-dd366e6a861c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I never thought that I'll do a commercial
to Microsoft, but <a href="http://www.microsoft.com/sql/solutions/bi/projectreal.mspx">Project
Real</a> is a great thing that they did and they should get the credit for it. This
project is a full end-to-end BI solution, including ETLs (using SSIS), Analysis Services
cubes and mining modules, Reporting Services reports, end-user Panorama views and
more.<br /><br />
We work with Panorama as our main GUI tool to show our users the cube's data as tables,
charts, dashboards, etc, so this project is really helping us to learn how to implement
our project from the first ETL step all the way to the last Panorama step.<br /><br />
Recommended.<br /><p></p><img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=a68059bf-fe59-48d5-a9e8-dd366e6a861c" /></body>
      <title>Project Real</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,a68059bf-fe59-48d5-a9e8-dd366e6a861c.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,a68059bf-fe59-48d5-a9e8-dd366e6a861c.aspx</link>
      <pubDate>Sat, 14 Jul 2007 21:05:54 GMT</pubDate>
      <description>I never thought that I'll do a commercial to Microsoft, but &lt;a href="http://www.microsoft.com/sql/solutions/bi/projectreal.mspx"&gt;Project
Real&lt;/a&gt; is a great thing that they did and they should get the credit for it. This
project is a full end-to-end BI solution, including ETLs (using SSIS), Analysis Services
cubes and mining modules, Reporting Services reports, end-user Panorama views and
more.&lt;br&gt;
&lt;br&gt;
We work with Panorama as our main GUI tool to show our users the cube's data as tables,
charts, dashboards, etc, so this project is really helping us to learn how to implement
our project from the first ETL step all the way to the last Panorama step.&lt;br&gt;
&lt;br&gt;
Recommended.&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=a68059bf-fe59-48d5-a9e8-dd366e6a861c" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,a68059bf-fe59-48d5-a9e8-dd366e6a861c.aspx</comments>
      <category>BI;BI/Panorama;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services;BI/SQL Server 2005/Integration Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=e36d9c69-b16d-4d4b-bea9-05e3a5d02729</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,e36d9c69-b16d-4d4b-bea9-05e3a5d02729.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,e36d9c69-b16d-4d4b-bea9-05e3a5d02729.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=e36d9c69-b16d-4d4b-bea9-05e3a5d02729</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In the data source view, when you edit the SQL by yourself (right click on the
table in the data source view, Replace table -&gt; With new named query) be careful
when using Oracle DB tables. When writing in the SQL the Oracle's table name with
small casing, the SQL parser will add commas to the table name, making the SQL not
work because the Oracle does not recognize this table name (with the commas).
</p>
        <p>
Solution: Enter the table name with big casing, which will make the parser leave the
table name as is. Also, remember: when creating or editing a named query always check
and syntax, but also run the query and check that you get the desirable result before
hitting the OK and saving the new named query.
</p>
        <p>
by the way, I wonder: what were we doing if the Oracle was case sensitive?
</p>
        <img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=e36d9c69-b16d-4d4b-bea9-05e3a5d02729" />
      </body>
      <title>Analysis Services using Oracle bug</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,e36d9c69-b16d-4d4b-bea9-05e3a5d02729.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,e36d9c69-b16d-4d4b-bea9-05e3a5d02729.aspx</link>
      <pubDate>Thu, 31 May 2007 20:36:37 GMT</pubDate>
      <description>&lt;p&gt;
In the data source view, when you edit the SQL by yourself&amp;nbsp;(right click on the
table in the data source view, Replace table -&amp;gt;&amp;nbsp;With new named query) be careful
when using Oracle DB tables. When writing in the SQL the Oracle's table name with
small casing, the SQL parser will add commas to the table name, making the SQL not
work because the Oracle does not recognize this table name (with the commas).
&lt;/p&gt;
&lt;p&gt;
Solution: Enter the table name with big casing, which will make the parser leave the
table name as is. Also, remember: when creating or editing a named query always check
and syntax, but also run the query and check that you get the desirable result before
hitting the OK and saving the new named query.
&lt;/p&gt;
&lt;p&gt;
by the way, I wonder: what&amp;nbsp;were we&amp;nbsp;doing if the Oracle was case sensitive?
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=e36d9c69-b16d-4d4b-bea9-05e3a5d02729" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,e36d9c69-b16d-4d4b-bea9-05e3a5d02729.aspx</comments>
      <category>BI;BI/SQL Server 2005;BI/SQL Server 2005/Analysis Services</category>
    </item>
  </channel>
</rss>