<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><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</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>Sun, 21 Sep 2008 22:10:48 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.9.6264.0</generator>
    <managingEditor>miky@zahav.net.il</managingEditor>
    <webMaster>miky@zahav.net.il</webMaster>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/MikySchreiberBlog" type="application/rss+xml" /><item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=f590b1f7-4d99-4539-bf47-349c121fd431</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,f590b1f7-4d99-4539-bf47-349c121fd431.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,f590b1f7-4d99-4539-bf47-349c121fd431.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=f590b1f7-4d99-4539-bf47-349c121fd431</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">My friends were stuck with a totally weird
bug this week. After a day of frustration they called me for the rescue. It took me
some time to figure it out and I think that every SSIS developer (and maybe every
developer) can learn a thing or two from others' mistakes.<br /><br /><u>The mission:</u> The data flow takes one table with duplicate rows and copies it
to another table and makes sure that every row will appear only once. In the way,
the data flow also adds some irrelevant fields. Among them is the Create_User and
Create_Date fields which tells by who and when the package last ran.<br /><u>How my friends did it:</u> Again, it's a very simple flow. They only added Derived
Column transformation to add the new fields and then they added an Aggregate transformation
to make every row appear only once. 
<br /><img src="http://www.miky-schreiber.com/Blog/content/binary/NonDeterministicAggregationDataFlow.GIF" border="0" /><br />
Note that this is not the real package. It's a sample I did on my machine to show
it here.<br /><br /><u>The Bug:</u> When I first seen this it seemed to me very simple flow and I asked
myself how can it be that this is happening:<br /><img src="http://www.miky-schreiber.com/Blog/content/binary/NonDeterministicAggregation.GIF" border="0" /><img src="http://www.miky-schreiber.com/Blog/content/binary/NonDeterministicAggregation2.GIF" border="0" /><br />
As you can see, it seems that the Aggregate transformation is not deterministic. Sometimes
it outputs 99 rows, sometimes 198 and in some other times I get other results as well.<br /><u>Investigating:</u> I wanted to see what's the difference between the table that
I got in the first time (99 rows) and the table I got in the second time (198 rows)
so I changed the destination table and compared the two tables. I ran "select * from
A where Column1+Column2+... not in (select Column1+Column2+... from B)"-style query
but it was no use - it showed me that there were no rows that appeared only in one
of the tables. In this step I really started to think (as my friends did) that maybe
the Aggregate transformation has something wrong inside... Instead of blaming Microsoft,
I decided to think. I needed to see what can make the flow non-deterministic. Then,
it hit me.<br /><br /><img src="http://www.miky-schreiber.com/Blog/content/binary/NonDeterministicAggregationDerivedColumn.GIF" border="0" /><img src="http://www.miky-schreiber.com/Blog/content/binary/NonDeterministicAggregationAggregate.GIF" border="0" /><br />
The only non-deterministic component in the flow is the Derived Column because it
has the getdate() function (it may be simple to see here, but in the original package
the derived column transformation had many fields). The results of this function may
differ in the milliseconds, especially for large tables. Then I looked in the Aggregate
transformation and seen that the Create_Date column also was in the Group by operation,
meaning that if two rows has different millisecond they will be placed twice in the
destination table, although they are the same in every column. That's it, the bug
was found. But still, one question remained: Why the query did not show me this? The
answer is also simple but tricky to find: In the comparison query I concatenated all
the columns in the tables in order to compare the results. When I did this, I casted
the Create_Date to nvarchar which truncated the milliseconds. 
<p /><u>Conclusions:</u><ul><li>
Pay attention to non-deterministic elements in what you do, whether it's code or ETL
process. 
</li><li>
When you do dummy stuff like checking all the checkboxes in a list - think what are
the outcomes. 
</li><li>
Call Miky when you're desperate.</li></ul><img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=f590b1f7-4d99-4539-bf47-349c121fd431" /></body>
      <title>Non Deterministic Aggregation in SSIS ?</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,f590b1f7-4d99-4539-bf47-349c121fd431.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,f590b1f7-4d99-4539-bf47-349c121fd431.aspx</link>
      <pubDate>Sun, 21 Sep 2008 22:10:48 GMT</pubDate>
      <description>My friends were stuck with a totally weird bug this week. After a day of frustration they called me for the rescue. It took me some time to figure it out and I think that every SSIS developer (and maybe every developer)&amp;nbsp;can learn a thing or two from others' mistakes.&lt;br&gt;
&lt;br&gt;
&lt;u&gt;The mission:&lt;/u&gt; The data flow takes one table with duplicate rows and copies it
to another table and makes sure that every row will appear only once. In the way,
the data flow also adds some irrelevant fields. Among them is the Create_User and
Create_Date fields which tells by who and when the package last ran.&lt;br&gt;
&lt;u&gt;How my friends did it:&lt;/u&gt; Again, it's a very simple flow. They only added Derived
Column transformation to add the new fields and then they added an Aggregate transformation
to make every row appear only once. 
&lt;br&gt;
&lt;img src="http://www.miky-schreiber.com/Blog/content/binary/NonDeterministicAggregationDataFlow.GIF" border=0&gt;
&lt;br&gt;
Note that this is not the real package. It's a sample I did on my machine to show
it here.&lt;br&gt;
&lt;br&gt;
&lt;u&gt;The Bug:&lt;/u&gt; When I first seen this it seemed to me very simple flow and I asked
myself how can it be that this is happening:&lt;br&gt;
&lt;img src="http://www.miky-schreiber.com/Blog/content/binary/NonDeterministicAggregation.GIF" border=0&gt;&lt;img src="http://www.miky-schreiber.com/Blog/content/binary/NonDeterministicAggregation2.GIF" border=0&gt;
&lt;br&gt;
As you can see, it seems that the Aggregate transformation is not deterministic. Sometimes
it outputs 99 rows, sometimes 198 and in some other times I get other results as well.&lt;br&gt;
&lt;u&gt;Investigating:&lt;/u&gt; I wanted to see what's the difference between the table that
I got in the first time (99 rows) and the table I got in the second time (198 rows)
so I changed the destination table and compared the two tables. I ran "select * from
A where Column1+Column2+... not in (select Column1+Column2+... from B)"-style query
but it was no use - it showed me that there were no rows that appeared only in one
of the tables. In this step I really started to think (as my friends did) that maybe
the Aggregate transformation has something wrong inside... Instead of blaming Microsoft,
I decided to think. I needed to see what can make the flow non-deterministic. Then,
it hit me.&lt;br&gt;
&lt;br&gt;
&lt;img src="http://www.miky-schreiber.com/Blog/content/binary/NonDeterministicAggregationDerivedColumn.GIF" border=0&gt;&lt;img src="http://www.miky-schreiber.com/Blog/content/binary/NonDeterministicAggregationAggregate.GIF" border=0&gt;
&lt;br&gt;
The only non-deterministic component in the flow is the Derived Column because it
has the getdate() function (it may be simple to see here, but in the original package
the derived column transformation had many fields). The results of this function may
differ in the milliseconds, especially for large tables. Then I looked in the Aggregate
transformation and seen that the Create_Date column also was in the Group by operation,
meaning that if two rows has different millisecond they will be placed twice in the
destination table, although they are the same in every column. That's it, the bug
was found. But still, one question remained: Why the query did not show me this? The
answer is also simple but tricky to find: In the comparison query I concatenated all
the columns in the tables in order to compare the results. When I did this, I casted
the Create_Date to nvarchar which truncated the milliseconds. 
&lt;p&gt;
&lt;/p&gt;
&lt;u&gt;Conclusions:&lt;/u&gt; 
&lt;ul&gt;
&lt;li&gt;
Pay attention to non-deterministic elements in what you do, whether it's code or ETL
process. 
&lt;li&gt;
When you do dummy stuff like checking all the checkboxes in a list - think what are
the outcomes. 
&lt;li&gt;
Call Miky when you're desperate.&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=f590b1f7-4d99-4539-bf47-349c121fd431" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,f590b1f7-4d99-4539-bf47-349c121fd431.aspx</comments>
      <category>BI;BI/SQL Server 2005;BI/SQL Server 2005/Integration Services;BI/SQL Server 2008;BI/SQL Server 2008/Integration Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=7e711077-554c-49f4-81f4-64319694cf36</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,7e711077-554c-49f4-81f4-64319694cf36.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,7e711077-554c-49f4-81f4-64319694cf36.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=7e711077-554c-49f4-81f4-64319694cf36</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">This week I had something disturbing. When
I installed Excel 2003 on the Panorama machine in order to use Excel functions in
my MDX calculations, the NovaView Desktop stopped working. When I tried to load a
view it threw an error in connection message. Calling to Panorama support, they told
me that it's a known issue and it's hard to find by using the Panorama knowledge base.
So here it is:<br /><br />
If you have connection issues in the Desktop program, enter the registry editor (Start
-&gt; Run -&gt; regedit). Look for HKEY_CLASSES_ROOT\MSOLAP\CLSID and make sure it's
the same as HKEY_CLASSES_ROOT\MSOLAP.3\CLSID. Remember - always copy <b>from MSOLAP.3
to MSOLAP</b> and not vise versa.<br /><p /><img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=7e711077-554c-49f4-81f4-64319694cf36" /></body>
      <title>Panorama and Excel Issue</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,7e711077-554c-49f4-81f4-64319694cf36.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,7e711077-554c-49f4-81f4-64319694cf36.aspx</link>
      <pubDate>Sat, 20 Sep 2008 20:38:48 GMT</pubDate>
      <description>This week I had something disturbing. When I installed Excel 2003 on the Panorama machine in order to use Excel functions in my MDX calculations, the NovaView Desktop stopped working. When I tried to load a view it threw an error in connection message. Calling to Panorama support, they told me that it's a known issue and it's hard to find by using the Panorama knowledge base. So here it is:&lt;br&gt;
&lt;br&gt;
If you have connection issues in the Desktop program, enter the registry editor (Start
-&amp;gt; Run -&amp;gt; regedit). Look for HKEY_CLASSES_ROOT\MSOLAP\CLSID and make sure it's
the same as HKEY_CLASSES_ROOT\MSOLAP.3\CLSID. Remember - always copy &lt;b&gt;from MSOLAP.3
to MSOLAP&lt;/b&gt; and not vise versa.&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=7e711077-554c-49f4-81f4-64319694cf36" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,7e711077-554c-49f4-81f4-64319694cf36.aspx</comments>
      <category>BI;BI/Panorama</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=7ccc1c69-845d-4e3a-b364-bda9a7d1fb83</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,7ccc1c69-845d-4e3a-b364-bda9a7d1fb83.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,7ccc1c69-845d-4e3a-b364-bda9a7d1fb83.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=7ccc1c69-845d-4e3a-b364-bda9a7d1fb83</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">My blog was down for couple of hours because
of this bug which been fixed in the later versions of dasBlog. I haven't found the
solution in google search so this post is for those who will search it in the future
(google scans every post in this blog). The solution(s) can be found <a href="http://www.codeplex.com/dasBlog/Thread/View.aspx?ThreadId=34910&amp;ANCHOR#Post115981">here</a>.<br /><p /><img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=7ccc1c69-845d-4e3a-b364-bda9a7d1fb83" /></body>
      <title>Item has already been added bug in dasBlog 1.9</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,7ccc1c69-845d-4e3a-b364-bda9a7d1fb83.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,7ccc1c69-845d-4e3a-b364-bda9a7d1fb83.aspx</link>
      <pubDate>Thu, 04 Sep 2008 18:03:37 GMT</pubDate>
      <description>My blog was down for couple of hours because of this bug which been fixed in the later versions of dasBlog. I haven't found the solution in google search so this post is for those who will search it in the future (google scans every post in this blog). The solution(s) can be found &lt;a href="http://www.codeplex.com/dasBlog/Thread/View.aspx?ThreadId=34910&amp;amp;ANCHOR#Post115981"&gt;here&lt;/a&gt;.&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=7ccc1c69-845d-4e3a-b364-bda9a7d1fb83" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,7ccc1c69-845d-4e3a-b364-bda9a7d1fb83.aspx</comments>
      <category>Tips &amp; Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=c513cf0e-0c66-4834-8f63-9bb965b9639c</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,c513cf0e-0c66-4834-8f63-9bb965b9639c.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,c513cf0e-0c66-4834-8f63-9bb965b9639c.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=c513cf0e-0c66-4834-8f63-9bb965b9639c</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <title>The PanoramaBasedWebSite project</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,c513cf0e-0c66-4834-8f63-9bb965b9639c.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,c513cf0e-0c66-4834-8f63-9bb965b9639c.aspx</link>
      <pubDate>Thu, 04 Sep 2008 17:37:45 GMT</pubDate>
      <description>In the last years I've seen many
astonishing BI web sites. I always asked myself what I need to do to bring my
customers such beautiful web-based BI solutions. After having much experience
with Panorama NovaView and especially the Panorama SDK I started to run some
questions in my mind: Why won't I build some re-usable puzzle pieces that can
be joined together to a web site? These pieces can be web controls that using
and even interacting Panorama views and Analysis services. Why won't publish it
as open source and give it to the BI community?&lt;br&gt;
&lt;br&gt;
The &lt;a href="http://www.codeplex.com/PanoramaBasedWebSite"&gt;PanoramaBasedWebSite&lt;/a&gt; project
is a toolkit that contains web controls you can easily use in your ASP.NET based web
site. The project is written in ASP.NET 2.0 and C# 3.5. These web controls interacts
with Panorama views (using Panorama SDK) and Analysis Services (using AMO).&lt;br&gt;
The idea is that you can take these puzzle pieces, combine them as you like in your
web site and create your good-looking BI web site with almost no programming. The
project is only in its first steps, but I believe that publishing the design/idea
is also important. This is why the first &lt;a href="http://www.codeplex.com/PanoramaBasedWebSite/Release/ProjectReleases.aspx?ReleaseId=16866"&gt;release&lt;/a&gt; is
already published, although it has only two web controls so far. This is what we have
so far and what I'm planning for the future. I'll be happy to hear your thoughts/ideas:&lt;br&gt;
&lt;br&gt;
&lt;u&gt;First Release Contents&lt;/u&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
PanoramaView web control - this is the main control of the project and it will probably
take a lot of the project's weight. The control simply shows panorama view. For now,
it doesn't do much rather then showing a view so there's a lot of work to do for this
control. It gets two properties - BriefingBookName and ViewName. You can look at the
TODO: comments in the code to see what future plans I have for this control.&lt;/li&gt;
&lt;li&gt;
UpdateDatePanel web control - this control shows the date and time when the last process
of the cube was made. It can be used in two ways: You can only set the PanoramaViewID
property. The control will extract the cube and the database name from the view and
take the update date from the cube. The other way is to set the CubeName and DataBaseName
properties.&lt;/li&gt;
&lt;/ul&gt;
&lt;u&gt;Future Plans&lt;/u&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
KPIView - Already working on it. Similar to PanoramaView, but if the view shows KPI
then a drilldown will be made when the user clicks on a gauge.&lt;/li&gt;
&lt;lipanoramacomments already="" working="" on="" it.="" one="" of="" my="" customers="" asked="" for="" ability="" bind="" comments="" to="" a="" then="" all="" users="" that="" see="" view="" also="" sees="" comments.="" control="" uses="" the="" ajaxcontroltoolkit="" accordion="" and="" it="" s="" very="" neat.="" believe="" me="" -="" you="" ll="" love="" this="" one.=""&gt;
&lt;li&gt;
QueryList - Shows the result of MDX query. For example, the list shows the top 10
employees of the month (in sales perspective, for example). This list will be interactive,
meaning that clicking on a row will make a drilldown, drill to data or replace the
list with another query results.&lt;/li&gt;
&lt;li&gt;
DimensionPicker - Gives the user the ability to pick members of a dimension/hierarchy.
After selecting, the control will slice all the views on the page (or only predefined
set of views).&lt;/li&gt;
&lt;li&gt;
DatePicker - Same as DimensionPicker but for dates. It will show a calendar to the
user and clicking on a date will perform a slice in the views.&lt;/li&gt;
&lt;/lipanoramacomments&gt;
&lt;/ul&gt;
&lt;p&gt;
The use of the controls in your aspx pages is very easy. You can see for yourself:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; color: brown;"&gt;PanoramaControls:UpdateDateLabel&lt;/span&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt; &lt;span style="color: red;"&gt;ID&lt;/span&gt;&lt;span style="color: blue;"&gt;="&lt;/span&gt;&lt;span style="color: black;"&gt;UpdateDateLabel1&lt;/span&gt;&lt;span style="color: blue;"&gt;"&lt;/span&gt; &lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="&lt;/span&gt;&lt;span style="color: black;"&gt;server&lt;/span&gt;&lt;span style="color: blue;"&gt;"&lt;/span&gt; &lt;span style="color: red;"&gt;PanoramaViewID&lt;/span&gt;&lt;span style="color: blue;"&gt;="&lt;/span&gt;&lt;span style="color: black;"&gt;PanoramaView1&lt;/span&gt;&lt;span style="color: blue;"&gt;"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: brown;"&gt;PanoramaControls:PanoramaView&lt;/span&gt; &lt;span style="color: red;"&gt;ID&lt;/span&gt;&lt;span style="color: blue;"&gt;="&lt;/span&gt;&lt;span style="color: black;"&gt;PanoramaView1&lt;/span&gt;&lt;span style="color: blue;"&gt;"&lt;/span&gt; &lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="&lt;/span&gt;&lt;span style="color: black;"&gt;server&lt;/span&gt;&lt;span style="color: blue;"&gt;"&lt;/span&gt; &lt;span style="color: red;"&gt;Width&lt;/span&gt;&lt;span style="color: blue;"&gt;="&lt;/span&gt;&lt;span style="color: black;"&gt;100%&lt;/span&gt;&lt;span style="color: blue;"&gt;"&lt;/span&gt; &lt;span style="color: red;"&gt;Height&lt;/span&gt;&lt;span style="color: blue;"&gt;="&lt;/span&gt;&lt;span style="color: black;"&gt;80%&lt;/span&gt;&lt;span style="color: blue;"&gt;"&lt;/span&gt; &lt;span style="color: red;"&gt;BriefingBookName&lt;/span&gt;&lt;span style="color: blue;"&gt;="&lt;/span&gt;&lt;span style="color: black;"&gt;MikysBook&lt;/span&gt;&lt;span style="color: blue;"&gt;"&lt;/span&gt; &lt;span style="color: red;"&gt;ViewName&lt;/span&gt;&lt;span style="color: blue;"&gt;="&lt;/span&gt;&lt;span style="color: black;"&gt;MyFirstView&lt;/span&gt;&lt;span style="color: blue;"&gt;"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
I'll be happy to read your thoughts and ideas about this project. There will be more
to come. Stay Tuned.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=c513cf0e-0c66-4834-8f63-9bb965b9639c" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,c513cf0e-0c66-4834-8f63-9bb965b9639c.aspx</comments>
      <category>BI;BI/Panorama;Programming;Programming/.Net</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=e83c59f6-3548-4bb0-b608-965db296ddd0</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,e83c59f6-3548-4bb0-b608-965db296ddd0.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,e83c59f6-3548-4bb0-b608-965db296ddd0.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=e83c59f6-3548-4bb0-b608-965db296ddd0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
There is one tiny new feature in SSAS 2008 that you can easily miss. It called Empty
Cube. When you create a new cube using the wizard, you can create an empty cube, meaning
that it has no measures, dimension relationships, etc. The original use of it is for
"users (who) want to create everything manually, or when all dimensions are linked
dimensions" (taken from the description in the wizard)
</p>
        <p>
          <img src="http://www.miky-schreiber.com/Blog/content/binary/emptyCube.jpg" />
        </p>
        <p>
In the past, I <a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,007d23dd-cf72-4096-8130-6bc2a0cc1783.aspx">written</a> about
using SSAS with Visual SourceSafe in order to have source and version control for
the SSAS project. I mentioned that it has many disadvantages but the big advantage
(source &amp; version control) is bigger so in the bottom line I recommend using it.
One of the problems we experienced were that every time that someone creates a new
object (cube, dimension, etc.) he has to check out the .dwproj file. The result
is that sometimes we have a fight in the team for that file and we shouting: "who
taken out the dwproj???" (yeah, I know that we can check who did it inside VSS but
shouting is more fun).
</p>
        <p>
The empty cube feature is a nice solution for this problem: When you create a new
project you can create all the (empty) cubes and then the .dwproj file is free and
no longer needed. I'm assuming that you know which cubes you'll have when starting
a new project. The only thing remained is the same solution for dimensions. I'll recommend
it in the Connect site (it's not working now for some reason).
</p>
        <img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=e83c59f6-3548-4bb0-b608-965db296ddd0" />
      </body>
      <title>Unexpected Use for Empty Cubes</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,e83c59f6-3548-4bb0-b608-965db296ddd0.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,e83c59f6-3548-4bb0-b608-965db296ddd0.aspx</link>
      <pubDate>Sun, 17 Aug 2008 17:50:41 GMT</pubDate>
      <description>&lt;p&gt;
There is one tiny new feature in SSAS 2008 that you can easily miss. It called Empty
Cube. When you create a new cube using the wizard, you can create an empty cube, meaning
that it has no measures, dimension relationships, etc. The original use of it is for
"users (who) want to create everything manually, or when all dimensions are linked
dimensions" (taken from the description in the wizard)
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.miky-schreiber.com/Blog/content/binary/emptyCube.jpg"&gt;
&lt;/p&gt;
&lt;p&gt;
In the past, I &lt;a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,007d23dd-cf72-4096-8130-6bc2a0cc1783.aspx"&gt;written&lt;/a&gt; about
using SSAS with Visual SourceSafe in order to have source and version control for
the SSAS project. I mentioned that it has many disadvantages but the big advantage
(source &amp;amp; version control) is bigger so in the bottom line I recommend using it.
One of the problems we experienced were that every time that someone creates a new
object (cube, dimension, etc.)&amp;nbsp;he has to check out the .dwproj file. The result
is that sometimes we have a fight in the team for that file and we shouting: "who
taken out the dwproj???" (yeah, I know that we can check who did it inside VSS but
shouting is more fun).
&lt;/p&gt;
&lt;p&gt;
The empty cube feature is a nice solution for this problem: When you create a new
project you can create all the (empty) cubes and then the .dwproj file is free and
no longer needed. I'm assuming that you know which cubes you'll have when starting
a new project. The only thing remained is the same solution for dimensions. I'll recommend
it in the Connect site (it's not working now for some reason).
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=e83c59f6-3548-4bb0-b608-965db296ddd0" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,e83c59f6-3548-4bb0-b608-965db296ddd0.aspx</comments>
      <category>BI;BI/SQL Server 2008;BI/SQL Server 2008/Analysis Services</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=0836f43b-3166-4d5c-a1d4-824d226abf91</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,0836f43b-3166-4d5c-a1d4-824d226abf91.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,0836f43b-3166-4d5c-a1d4-824d226abf91.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=0836f43b-3166-4d5c-a1d4-824d226abf91</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Found a great site for BI beginners. <a href="http://www.learnmicrosoftbi.com/Default.aspx">Learn
Microsoft BI</a> has some videos about BI and SSAS which can place you in a good position
as a beginner.<br /><p /><img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=0836f43b-3166-4d5c-a1d4-824d226abf91" /></body>
      <title>Learn Microsoft BI</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,0836f43b-3166-4d5c-a1d4-824d226abf91.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,0836f43b-3166-4d5c-a1d4-824d226abf91.aspx</link>
      <pubDate>Tue, 12 Aug 2008 11:36:52 GMT</pubDate>
      <description>Found a great site for BI beginners. &lt;a href="http://www.learnmicrosoftbi.com/Default.aspx"&gt;Learn
Microsoft BI&lt;/a&gt; has some videos about BI and SSAS which can place you in a good position
as a beginner.&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=0836f43b-3166-4d5c-a1d4-824d226abf91" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,0836f43b-3166-4d5c-a1d4-824d226abf91.aspx</comments>
      <category>BI;BI/SQL Server 2005;BI/SQL Server 2008</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=f8e1b076-cf85-42c1-9e90-094ad752f9b2</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,f8e1b076-cf85-42c1-9e90-094ad752f9b2.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,f8e1b076-cf85-42c1-9e90-094ad752f9b2.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=f8e1b076-cf85-42c1-9e90-094ad752f9b2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I've been asked to review Widgenie and
since I'm a nice person - why not? <a href="http://widgenie.com/">Widgenie</a> is
basically a widget creator that takes data from variety of sources: excel and csv
files for now and in the future Google docs and more data sources. After you declare
your data source you can change the look of the widget and then you can publish it
in variety of ways: Facebook, blog, comments, etc.<br /><br />
I'm writing this post while creating my first widget so these comments are from the
first encounter with the product, meaning that I can miss few things, but I believe
you readers will get the picture:<br /><br /><ul><li>
The limitations on the excel source are way too much: Why the maximum file size is
2M? "The sheet should contain only the data and column headers. Titles, notes and
other text outside of the data table will impede the upload" ? Why can't I take my
old familiar excel and use it as is? Com'n guys, write some VBA scripts and work this
out.<br /></li><li>
When I start from "Create new Widget" and then moving straight to "Create new Data
File" because it is my first time, I want to go straight from the end of the data
file wizard to when I've been in the create widget wizard. I don't want to start over
the create widget wizard.<br /></li><li>
Every step in the wizard has a little question mark with it that explains the current
part. It is very intuitive, nicely done and nicely put.</li><li>
The widgets are very beautiful. As a BI developer, I'd be happy to put some of these
on the CEO's dashboard.</li><li>
What about multilanguage support? The hebrew columns appears as jibrish in the widgets.</li><li>
The publishing process is not simple enought. I don't want to get a script that I
need to place in my blogger/facebook/iGoogle. I want that the process will end at
the target of the widget. For example, let's say I want to put the widget in my facebook's
profile. I would expect that facebook will be open in the end of the wizard and a
new Widgenie application will be created on my profile asking me to choose one of
the widgets I created.</li><li>
The text cloud widget is very simple and powerful. It can be very useful for managers.</li></ul>
For conclusion, Widgenie is a very beautiful product that has a long way to do if
it wants to stand with the big sharks of the BI world. It has to fix some issues,
support more sources and targets and have more capabilities (snapshots support, SSAS
integration, excel-style chart editing and more). I don't know why I can't embed here
the widgets (it's just ain't working) so here are links to the <a href="http://app.widgenie.com/WidgetView.aspx?ID=652e94a7_e1fb_497e_9110_dc4653d76abc">bar
chart</a> and the <a href="http://app.widgenie.com/WidgetView.aspx?ID=487402ee_6a8a_4331_9ac3_f27fd4293f9c">text
cloud</a> widgets.<br /><p /><img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=f8e1b076-cf85-42c1-9e90-094ad752f9b2" /></body>
      <title>Widgenie</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,f8e1b076-cf85-42c1-9e90-094ad752f9b2.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,f8e1b076-cf85-42c1-9e90-094ad752f9b2.aspx</link>
      <pubDate>Tue, 12 Aug 2008 11:12:53 GMT</pubDate>
      <description>I've been asked to review Widgenie and since I'm a nice person - why not? &lt;a href="http://widgenie.com/"&gt;Widgenie&lt;/a&gt; is
basically a widget creator that takes data from variety of sources: excel and csv
files for now and in the future Google docs and more data sources. After you declare
your data source you can change the look of the widget and then you can publish it
in variety of ways: Facebook, blog, comments, etc.&lt;br&gt;
&lt;br&gt;
I'm writing this post while creating my first widget so these comments are from the
first encounter with the product, meaning that I can miss few things, but I believe
you readers will get the picture:&lt;br&gt;
&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
The limitations on the excel source are way too much: Why the maximum file size is
2M? "The sheet should contain only the data and column headers. Titles, notes and
other text outside of the data table will impede the upload" ? Why can't I take my
old familiar excel and use it as is? Com'n guys, write some VBA scripts and work this
out.&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
When I start from "Create new Widget" and then moving straight to "Create new Data
File" because it is my first time, I want to go straight from the end of the data
file wizard to when I've been in the create widget wizard. I don't want to start over
the create widget wizard.&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
Every step in the wizard has a little question mark with it that explains the current
part. It is very intuitive, nicely done and nicely put.&lt;/li&gt;
&lt;li&gt;
The widgets are very beautiful. As a BI developer, I'd be happy to put some of these
on the CEO's dashboard.&lt;/li&gt;
&lt;li&gt;
What about multilanguage support? The hebrew columns appears as jibrish in the widgets.&lt;/li&gt;
&lt;li&gt;
The publishing process is not simple enought. I don't want to get a script that I
need to place in my blogger/facebook/iGoogle. I want that the process will end at
the target of the widget. For example, let's say I want to put the widget in my facebook's
profile. I would expect that facebook will be open in the end of the wizard and a
new Widgenie application will be created on my profile asking me to choose one of
the widgets I created.&lt;/li&gt;
&lt;li&gt;
The text cloud widget is very simple and powerful. It can be very useful for managers.&lt;/li&gt;
&lt;/ul&gt;
For conclusion, Widgenie is a very beautiful product that has a long way to do if
it wants to stand with the big sharks of the BI world. It has to fix some issues,
support more sources and targets and have more capabilities (snapshots support, SSAS
integration, excel-style chart editing and more). I don't know why I can't embed here
the widgets (it's just ain't working) so here are links to the &lt;a href="http://app.widgenie.com/WidgetView.aspx?ID=652e94a7_e1fb_497e_9110_dc4653d76abc"&gt;bar
chart&lt;/a&gt; and the &lt;a href="http://app.widgenie.com/WidgetView.aspx?ID=487402ee_6a8a_4331_9ac3_f27fd4293f9c"&gt;text
cloud&lt;/a&gt; widgets.&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=f8e1b076-cf85-42c1-9e90-094ad752f9b2" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,f8e1b076-cf85-42c1-9e90-094ad752f9b2.aspx</comments>
      <category>BI</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=567a20f1-72d3-40b4-9527-afe3663ae262</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,567a20f1-72d3-40b4-9527-afe3663ae262.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,567a20f1-72d3-40b4-9527-afe3663ae262.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=567a20f1-72d3-40b4-9527-afe3663ae262</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <a href="http://www.opensearch.org">OpenSearch</a> is
one of the beautiful things I discovered lately. If you're using Firefox 2 and above
or Internet Explorer 7, look at the search field in the right-top corner of the browser.
See the shiny little thingy there? Click on it and you can instantly add two new search
engines for fast search through your browser. The first one is my blog's search and
the second (and more important) one is the ability to search <a href="http://www.biblogs.com">BiBlogs</a> right
from the browser. Yeah, now you can search the whole BI community's blogs with only
one click.<br /><br />
I call all the BI bloggers to add this too. It's 5 minutes work and it can help lot
of people out there. See <a href="http://www.hanselman.com/blog/AddingOpenSearchToYourWebsiteAndGettingInTheBrowsersSearchBox.aspx">here</a> for
instructions.<br /><p /><img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=567a20f1-72d3-40b4-9527-afe3663ae262" /></body>
      <title>Search the Whole BI Community with One Click</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,567a20f1-72d3-40b4-9527-afe3663ae262.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,567a20f1-72d3-40b4-9527-afe3663ae262.aspx</link>
      <pubDate>Fri, 25 Jul 2008 21:26:41 GMT</pubDate>
      <description>&lt;a href="http://www.opensearch.org"&gt;OpenSearch&lt;/a&gt; is one of the beautiful things
I discovered lately. If you're using Firefox 2 and above or Internet Explorer 7, look
at the search field in the right-top corner of the browser. See the shiny little thingy
there? Click on it and you can instantly add two new search engines for fast search
through your browser. The first one is my blog's search and the second (and more important)
one is the ability to search &lt;a href="http://www.biblogs.com"&gt;BiBlogs&lt;/a&gt; right from
the browser. Yeah, now you can search the whole BI community's blogs with only one
click.&lt;br&gt;
&lt;br&gt;
I call all the BI bloggers to add this too. It's 5 minutes work and it can help lot
of people out there. See &lt;a href="http://www.hanselman.com/blog/AddingOpenSearchToYourWebsiteAndGettingInTheBrowsersSearchBox.aspx"&gt;here&lt;/a&gt; for
instructions.&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=567a20f1-72d3-40b4-9527-afe3663ae262" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,567a20f1-72d3-40b4-9527-afe3663ae262.aspx</comments>
      <category>BI;Programming;Tips &amp; Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=cf4f07c4-447b-4b79-8a70-4fe40f5033c1</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,cf4f07c4-447b-4b79-8a70-4fe40f5033c1.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,cf4f07c4-447b-4b79-8a70-4fe40f5033c1.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=cf4f07c4-447b-4b79-8a70-4fe40f5033c1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">When you practice on SQL Server on your
local machine you don't want that its services will start up with the computer. As
I mentioned before, you should declare the startup method of these services as manual
(see <a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,ee8e2951-09b7-4d07-9819-0535348c28e7.aspx">here</a>).
After that, you can build two simple batch files that will start and stop the services.
Believe me - it's very comfotable to start and stop the services with only one mouse
click. The first batch file (I called it sql.bat) contains only two lines:<br /><br />
net start MSSQLSERVER<br />
net start MSSqlServerOLAPService<br /><br />
The second one (sqlend.bat) looks like that:<br /><br />
net stop MSSQLSERVER<br />
net stop MSSqlServerOLAPService<br /><br />
Note that I only start/stop the SQL Server and analysis services, but you can do whatever
you like.<br /><br />
Have fun.<br /><p /><img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=cf4f07c4-447b-4b79-8a70-4fe40f5033c1" /></body>
      <title>Manually Starting the SQL Server Services on your Machine</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,cf4f07c4-447b-4b79-8a70-4fe40f5033c1.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,cf4f07c4-447b-4b79-8a70-4fe40f5033c1.aspx</link>
      <pubDate>Wed, 23 Jul 2008 19:19:08 GMT</pubDate>
      <description>When you practice on SQL Server on your local machine you don't want that its services will start up with the computer. As I mentioned before, you should declare the startup method of these services as manual (see &lt;a href="http://www.miky-schreiber.com/Blog/PermaLink,guid,ee8e2951-09b7-4d07-9819-0535348c28e7.aspx"&gt;here&lt;/a&gt;).
After that, you can build two simple batch files that will start and stop the services.
Believe me - it's very comfotable to start and stop the services with only one mouse
click. The first batch file (I called it sql.bat) contains only two lines:&lt;br&gt;
&lt;br&gt;
net start MSSQLSERVER&lt;br&gt;
net start MSSqlServerOLAPService&lt;br&gt;
&lt;br&gt;
The second one (sqlend.bat) looks like that:&lt;br&gt;
&lt;br&gt;
net stop MSSQLSERVER&lt;br&gt;
net stop MSSqlServerOLAPService&lt;br&gt;
&lt;br&gt;
Note that I only start/stop the SQL Server and analysis services, but you can do whatever
you like.&lt;br&gt;
&lt;br&gt;
Have fun.&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=cf4f07c4-447b-4b79-8a70-4fe40f5033c1" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,cf4f07c4-447b-4b79-8a70-4fe40f5033c1.aspx</comments>
      <category>BI;BI/SQL Server 2005;BI/SQL Server 2008;Tips &amp; Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=1e53bd53-42d2-42ef-aeed-dc69c6c12a2c</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,1e53bd53-42d2-42ef-aeed-dc69c6c12a2c.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,1e53bd53-42d2-42ef-aeed-dc69c6c12a2c.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=1e53bd53-42d2-42ef-aeed-dc69c6c12a2c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Sometimes the uninstall process does not
succeed or even worse - the "Add or Remove programs" interface does not allow you
to uninstall the product because it already uninstalled / doesn't exist / you name
it. The problem is that the uninstalled program can't be removed from the list, it
can't be uninstalled and it prevents another installation or re-installation. This
happens a lot with Microsoft's heavy products such as SQL Server and Visual Studio
but it can also happen with other products too.<br />
What can you do?<p>
Here's a small tip: Open the registry editor (Start -&gt; Run -&gt; regedit) and go
to the path: My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall.<br />
Under this folder you'll see many folders with GUI names such as {1268CDD4-0FED-3CE6-8A9D-C3B012ABCD8F}.
To know what installation it is, look for the key named DisplayName under this GUI
folder. In most of these folders you'll see a key named UninstallString. To uninstall
this program, copy the value of UninstallString and paste it in the run dialog. This
will start the uninstall process.<br /><br />
This trick will not always work, but it can help you a lot. Especially with broken
installation of SQL Server.<br /><br />
Enjoy.<br /></p><p /><img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=1e53bd53-42d2-42ef-aeed-dc69c6c12a2c" /></body>
      <title>When Uninstall is not enough</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,1e53bd53-42d2-42ef-aeed-dc69c6c12a2c.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,1e53bd53-42d2-42ef-aeed-dc69c6c12a2c.aspx</link>
      <pubDate>Sun, 20 Jul 2008 20:24:27 GMT</pubDate>
      <description>Sometimes the uninstall process does not succeed or even worse - the "Add or Remove programs" interface does not allow you to uninstall the product because it already uninstalled / doesn't exist / you name it. The problem is that the uninstalled program can't be removed from the list, it can't be uninstalled and it prevents another installation or re-installation. This happens a lot with Microsoft's heavy products such as SQL Server and Visual Studio but it can also happen with other products too.&lt;br&gt;
What can you do?&lt;p&gt;
Here's a small tip: Open the registry editor (Start -&amp;gt; Run -&amp;gt; regedit) and go
to the path: My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall.&lt;br&gt;
Under this folder you'll see many folders with GUI names such as {1268CDD4-0FED-3CE6-8A9D-C3B012ABCD8F}.
To know what installation it is, look for the key named DisplayName under this GUI
folder. In most of these folders you'll see a key named UninstallString. To uninstall
this program, copy the value of UninstallString and paste it in the run dialog. This
will start the uninstall process.&lt;br&gt;
&lt;br&gt;
This trick will not always work, but it can help you a lot. Especially with broken
installation of SQL Server.&lt;br&gt;
&lt;br&gt;
Enjoy.&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=1e53bd53-42d2-42ef-aeed-dc69c6c12a2c" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,1e53bd53-42d2-42ef-aeed-dc69c6c12a2c.aspx</comments>
      <category>BI;BI/SQL Server 2005;BI/SQL Server 2008;Tips &amp; Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.miky-schreiber.com/Blog/Trackback.aspx?guid=48e3008f-c55e-4ce2-bbd6-b783fee240b7</trackback:ping>
      <pingback:server>http://www.miky-schreiber.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.miky-schreiber.com/Blog/PermaLink,guid,48e3008f-c55e-4ce2-bbd6-b783fee240b7.aspx</pingback:target>
      <dc:creator>mikypuff</dc:creator>
      <wfw:comment>http://www.miky-schreiber.com/Blog/CommentView,guid,48e3008f-c55e-4ce2-bbd6-b783fee240b7.aspx</wfw:comment>
      <wfw:commentRss>http://www.miky-schreiber.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=48e3008f-c55e-4ce2-bbd6-b783fee240b7</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">Some has asked me why I don't blog anymore.
The answer is simple - say hello to Hadas, my new daughter. Because of the birth we
moved to a new apartment few weeks ago and in the last Sunday my wife, Noga, gave
birth to Hadas. Now it is time to keep on the blogging. Be High!<br />
P.S<br /><a href="http://www.facebook.com/album.php?aid=304&amp;l=2f612&amp;id=1560390054">Here</a> you
can see more Hadas's photos.<br /><span /><img src="http://www.miky-schreiber.com/Blog/content/binary/pic%20027.jpg" border="0" /><img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=48e3008f-c55e-4ce2-bbd6-b783fee240b7" /></body>
      <title>New Member in the Schreiber Clan</title>
      <guid isPermaLink="false">http://www.miky-schreiber.com/Blog/PermaLink,guid,48e3008f-c55e-4ce2-bbd6-b783fee240b7.aspx</guid>
      <link>http://www.miky-schreiber.com/Blog/PermaLink,guid,48e3008f-c55e-4ce2-bbd6-b783fee240b7.aspx</link>
      <pubDate>Sat, 19 Jul 2008 20:31:28 GMT</pubDate>
      <description>Some has asked me why I don't blog anymore. The answer is simple - say hello to Hadas, my new daughter. Because of the birth we moved to a new apartment few weeks ago and in the last Sunday my wife, Noga, gave birth to Hadas. Now it is time to keep on the blogging. Be High!&lt;br&gt;
P.S&lt;br&gt;
&lt;a href="http://www.facebook.com/album.php?aid=304&amp;amp;l=2f612&amp;amp;id=1560390054"&gt;Here&lt;/a&gt; you
can see more Hadas's photos.&lt;br&gt;
&lt;span&gt;&lt;/span&gt;&lt;img src="http://www.miky-schreiber.com/Blog/content/binary/pic%20027.jpg" border="0"&gt;&lt;img width="0" height="0" src="http://www.miky-schreiber.com/Blog/aggbug.ashx?id=48e3008f-c55e-4ce2-bbd6-b783fee240b7" /&gt;</description>
      <comments>http://www.miky-schreiber.com/Blog/CommentView,guid,48e3008f-c55e-4ce2-bbd6-b783fee240b7.aspx</comments>
      <category>Life</category>
    </item>
  </channel>
</rss>
