<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Frog-Blog</title>
	<atom:link href="http://www.purplefrogsystems.com/blog/index.php/2008/02/wp-rss2.php" rel="self" type="application/rss+xml" />
	<link>http://www.purplefrogsystems.com/blog</link>
	<description>Purple Frog-Blog for all that is Business Intelligence</description>
	<lastBuildDate>Mon, 06 Sep 2010 21:20:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>BCS talk on Business Intelligence</title>
		<link>http://www.purplefrogsystems.com/blog/index.php/2010/09/bcs-talk-on-business-intelligence/</link>
		<comments>http://www.purplefrogsystems.com/blog/index.php/2010/09/bcs-talk-on-business-intelligence/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 20:22:52 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Business Intelligence]]></category>
		<category><![CDATA[BCS]]></category>
		<category><![CDATA[Talk]]></category>

		<guid isPermaLink="false">http://www.purplefrogsystems.com/blog/?p=174</guid>
		<description><![CDATA[On Monday 20th September, Alex &#038; Hollie from Purple Frog Systems will be giving a talk on business intelligence to the Shropshire branch of the British Computer Society.
The event is free to attend, even for non BCS members, and will be held from 6.15pm at the Telford campus of Wolverhampton Uni.
We&#8217;ll be providing an introduction [...]]]></description>
			<content:encoded><![CDATA[<p>On Monday 20th September, Alex &#038; Hollie from Purple Frog Systems will be giving a talk on business intelligence to the Shropshire branch of the British Computer Society.</p>
<p>The event is free to attend, even for non BCS members, and will be held from 6.15pm at the Telford campus of Wolverhampton Uni.</p>
<p>We&#8217;ll be providing an introduction to BI, explaining what it is, how it works and how it can benefit your organisation.</p>
<p><img alt="" src="Http://i.telegraph.co.uk/telegraph/multimedia/archive/00685/ufo-uk-map404_685533c.jpg" title="UkMap" class="alignleft" width="101" height="88" />We&#8217;ll present a fully working demonstration of how to turn a simple list of customers/members into a highly interactive information system, using the latest in spatial mapping techniques and OLAP cubes.</p>
<p>Register for free at the <a href="http://shropshire.bcs.org/index.php/events" target="_blank">BCS events website</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.purplefrogsystems.com/blog/index.php/2010/09/bcs-talk-on-business-intelligence/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Will DAX replace MDX</title>
		<link>http://www.purplefrogsystems.com/blog/index.php/2010/09/will-dax-replace-mdx/</link>
		<comments>http://www.purplefrogsystems.com/blog/index.php/2010/09/will-dax-replace-mdx/#comments</comments>
		<pubDate>Fri, 03 Sep 2010 14:36:33 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Analysis Services]]></category>
		<category><![CDATA[PowerPivot]]></category>
		<category><![CDATA[DAX]]></category>
		<category><![CDATA[MDX]]></category>

		<guid isPermaLink="false">http://www.purplefrogsystems.com/blog/?p=165</guid>
		<description><![CDATA[For those that haven&#8217;t yet heard of DAX, it&#8217;s an expression language developed by Microsoft to perform calculations against PowerPivot. Stepping back one step further, PowerPivot is essentially a local Analysis Services cube that runs within Excel 2010.
I&#8217;ve heard plenty of comments from various sources about how DAX is the [multi-dimensional] query language of the [...]]]></description>
			<content:encoded><![CDATA[<p>For those that haven&#8217;t yet heard of DAX, it&#8217;s an expression language developed by Microsoft to perform calculations against PowerPivot. Stepping back one step further, PowerPivot is essentially a local Analysis Services cube that runs within Excel 2010.</p>
<p>I&#8217;ve heard plenty of comments from various sources about how DAX is the [multi-dimensional] query language of the future and how it&#8217;s going to kill off MDX. Ok&#8230;. well no, it&#8217;s not ok.</p>
<p>For starters they both exist for two different purposes. DAX is not a query language but an expression language. You can use MDX to query information from a cube and generate a pivot, you can&#8217;t with DAX as it is not a query language.</p>
<p><img class="size-full wp-image-166 alignleft" title="powerpivot" src="http://www.purplefrogsystems.com/blog/wp-content/uploads/2010/09/powerpivot.jpg" alt="" width="110" height="111" />The best way to think of DAX is as an extension to Excel formulas, you can use it to perform a calculation against an existing set of cells, in this case, a PowerPivot dataset.</p>
<p>It is also similar to an MDX calculated member, and in fact supports a number of MDX functions (TotalYTD, ParallelPeriod etc.).</p>
<p><strong>If your data is in a database:</strong> You would use SQL to query data from a database and import the results into Excel. You would then use Excel expressions/calculations to enhance the data.</p>
<p><strong>If your data is in a cube:</strong> You would use an Excel pivot (or MDX query) to query the data and import the results into Excel. You then have to use a third party tool such as <a href="http://olappivottableextend.codeplex.com/" target="_blank">OLAP PivotTable Extensions</a> to add expressions/calculations to enhance the data.</p>
<p><strong>If your data is in PowerPivot:</strong> You would use PowerPivot to query the data and import the results into Excel. You would then use DAX to add calculations to enhance the data.</p>
<p>DAX is a fantastic expression tool, and one that provides significant power to PowerPivot, but no, it won&#8217;t replace MDX. My hope is that Microsoft will provide DAX capability for MDX queries as well, and not restrict it to PowerPivot queries. As I&#8217;ve shown in my previous blog post it&#8217;s a great expression language that would provide significant benefit to cube users.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.purplefrogsystems.com/blog/index.php/2010/09/will-dax-replace-mdx/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Calculating Run Rate in DAX for PowerPivot</title>
		<link>http://www.purplefrogsystems.com/blog/index.php/2010/08/calculating-run-rate-in-dax-for-powerpivot/</link>
		<comments>http://www.purplefrogsystems.com/blog/index.php/2010/08/calculating-run-rate-in-dax-for-powerpivot/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 15:20:57 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Business Intelligence]]></category>
		<category><![CDATA[PowerPivot]]></category>
		<category><![CDATA[DAX]]></category>
		<category><![CDATA[Finance]]></category>

		<guid isPermaLink="false">http://www.purplefrogsystems.com/blog/?p=156</guid>
		<description><![CDATA[In my previous post I explained how to create a calculated MDX member that projects full year data (sales etc.) based on existing year to date data.
In this post I&#8217;ll be doing exactly the same but in DAX, the new expression language used to enhance PowerPivot data. As it&#8217;s the same desired outcome, I&#8217;m not [...]]]></description>
			<content:encoded><![CDATA[<p>In my previous post I explained how to <a href="http://www.purplefrogsystems.com/blog/index.php/2010/08/calculate-run-rate-full-year-projection-in-mdx/">create a calculated MDX member that projects full year data</a> (sales etc.) based on existing year to date data.</p>
<p>In this post I&#8217;ll be doing exactly the same but in DAX, the new expression language used to enhance PowerPivot data. As it&#8217;s the same desired outcome, I&#8217;m not going to repeat the background, you&#8217;ll have to look at my previous post for that.</p>
<p>The expressions below assume that you have a single table &#8216;Sales&#8217; with a [Date] column and an [Internet Sales Amount] column.</p>
<p><b>Step 1 &#8211; What are our total sales so far this year?</b></p>
<p>We use the TOTALYTD function to work this out for us</p>
<pre><span style="color: #008000;">
  =TOTALYTD(SUM(Sales[Internet Sales Amount])
     ,Sales[Date], all(Sales))
</span></pre>
<p>The first parameter is the expression we want to calculate, i.e. the sum of internet sales.<br />
The second parameter specifies the date we&#8217;re calculating up to.<br />
The third parameter is one that catches a lot of people out. We have to tell DAX the context of the date. As it stands the expression can only see the data in the selected row, by specifing all(Sales) in the filter we expand the expression to be able to look at all of the data.</p>
<p><b>Step 2 &#8211; How far are we though the year?</b></p>
<p>It&#8217;s here where DAX really shows an improvement in the functions available over and above what&#8217;s available in MDX. There&#8217;s a YEARFRAC function which calculates how far we are through the year.</p>
<pre><span style="color: #008000;">
  =YEARFRAC(
     CONCATENATE("01/01/"
         ,year(Sales[Date]))
     ,Sales[Date]))
</span></pre>
<p>The first parameter is the start date, i.e. the 1st January. We have to build this using the year of the selected row to ensure we get the right year.<br />
The second parameter is the date of the record we&#8217;re looking at, Sales[Date].</p>
<p><b>Step 3 &#8211; Project the value to the end of the year</b></p>
<p>We combine the two values by simply dividing the YTD figure by how far we are through the year</p>
<pre><span style="color: #008000;">
  =TOTALYTD(SUM(Sales[Internet Sales Amount])
     ,Sales[Date], all(Sales))
  / YEARFRAC(
      CONCATENATE("01/01/"
          , year(Sales[Date]))
     ,Sales[Date]))
</span></pre>
<p><img src="http://www.purplefrogsystems.com/blog/wp-content/uploads/2010/08/DAXRunRate.png" alt="" title="DAXRunRate" width="591" height="302" class="alignnone size-full wp-image-157" /><br />
This chart shows how the full year run rate is adjusted throughout the year as the cumulative sales to date grows. At the start of the year it&#8217;s quite volatile, but from February it settles down with an acurate projection.</p>
<p>And it really is as easy as that.</p>
<p>Frog-Blog Out</p>
]]></content:encoded>
			<wfw:commentRss>http://www.purplefrogsystems.com/blog/index.php/2010/08/calculating-run-rate-in-dax-for-powerpivot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calculate Run Rate (Full Year Projection) in MDX</title>
		<link>http://www.purplefrogsystems.com/blog/index.php/2010/08/calculate-run-rate-full-year-projection-in-mdx/</link>
		<comments>http://www.purplefrogsystems.com/blog/index.php/2010/08/calculate-run-rate-full-year-projection-in-mdx/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 17:26:18 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Analysis Services]]></category>
		<category><![CDATA[Calculated Member]]></category>
		<category><![CDATA[Cube]]></category>
		<category><![CDATA[Finance]]></category>
		<category><![CDATA[MDX]]></category>
		<category><![CDATA[OLAP]]></category>
		<category><![CDATA[SSAS]]></category>

		<guid isPermaLink="false">http://www.purplefrogsystems.com/blog/?p=152</guid>
		<description><![CDATA[This post explains how to create an MDX calculated member that will take a value from the cube and project it forward to the end of the year. This provides a simple mechanism for calculating what your expected total will be at year end, based upon current performance.
To do this more accurately you should use [...]]]></description>
			<content:encoded><![CDATA[<p>This post explains how to create an MDX calculated member that will take a value from the cube and project it forward to the end of the year. This provides a simple mechanism for calculating what your expected total will be at year end, based upon current performance.</p>
<p>To do this more accurately you should use time series data mining models in SSAS and use DMX expressions to query the results, but this method is very simple and requires little effort, and will be pretty accurate so long as the data you&#8217;re modelling is fairly linear. Please note though that the more cyclical and seasonal your data is the less effective this will be.</p>
<p>The basic idea is that we take what we have done so far (i.e. year to date sales), look at how far through the year we are, and extrapolate the value of future months (or days/weeks/etc.) based upon values so far.</p>
<p>i.e. If we&#8217;re at March month end and we&#8217;ve sold 100 widgets so far this year, we&#8217;re 1/4 of the way through the year so we multiply 100 by 4 and get a prejected yearly total of 400.</p>
<p><img src="http://www.purplefrogsystems.com/blog/wp-content/uploads/2010/08/RunRateAt6Months.png" alt="" title="RunRateAt6Months" width="462" height="220" class="alignleft size-full wp-image-153" /><br />
This chart shows the concept of what we&#8217;re doing, and shows the full year prejections calculated in March (with 3 months of available data) and June (6 months of data). The projections obviously get more accurate the further you are through the year.</p>
<p>One of the points to note is that when creating a calculation like this, based upon a time dimension, the calculation should always work with any level of the dimension hierarchy selected. i.e. The user shouldn&#8217;t care whether they&#8217;re looking at a month, week, quarter or a day, the calculation should always work the same. To achieve this we simply use the .currentmember of the time hierarchy.</p>
<p>The following examples are based upon projecting the Internet Sales Amount measure found within the SQL Server 2008 Adventure Works DW sample cube.</p>
<p><b>Step 1 &#8211; What are our total sales so far this year?</b></p>
<p>MDX helpfully provides us with the YTD function which takes care of this for us.</p>
<pre><span style="color: #008000;">
  MEMBER [Measures].[YTD Sales] AS
    AGGREGATE(
      YTD([Date].[Calendar].CurrentMember)
      ,[Measures].[Internet Sales Amount])
</span></pre>
<p>This takes the current member of the Calendar hierarchy, and creates a set of all dates before it (this year) using YTD. It then aggregates (in this case sums) the Internet Sales Amount for all of these dates to calculate YTD Sales.</p>
<p><b>Step 2 &#8211; Which period are we in?</b></p>
<p>Here we&#8217;ll use the same YTD function to create a set of all dates so far this year, but in this case we&#8217;ll count the number of resulting members. Note that because we&#8217;re using the .CurrentMember of the hierarchy, it doesn&#8217;t matter if we&#8217;re looking at a date, week or month, the MDX will work. i.e. If we&#8217;re looking at 21 Jan it will return 21. If we&#8217;re looking at Q3 it will return 3, August will return 8 etc.</p>
<pre><span style="color: #008000;">
  MEMBER [Measures].[CurPeriod] AS
    COUNT(
      YTD([Date].[Calendar].CurrentMember)
      ,INCLUDEEMPTY)
</span></pre>
<p><b>Step 3 &#8211; How many periods are in the year?</b></p>
<p>If we coded this to only work with months then we could hard code this to 12 however we need to keep it generic to all levels of the hierarchy. So, we have to count all the cousins of the current time member [within this year]. Unfortunately there isn&#8217;t a Cousins function in MDX, and Siblings will only return other members within the same parent. i.e. siblings of May 4th would include May 1 through to May 31. To get around this we find the year of the current member by using the Ancestor function.</p>
<pre><span style="color: #008000;">
  ANCESTOR([Date].[Calendar].CurrentMember
  , [Date].[Calendar].[Calendar Year])
</span></pre>
<p>Then we find all of the descendants of the year, at the same level of the hierarchy (week/day/etc.) as the current member. We can then take a count as before.</p>
<pre><span style="color: #008000;">
  MEMBER [Measures].[TotalPeriods] AS
    COUNT(
      DESCENDANTS(
        ANCESTOR([Date].[Calendar].CurrentMember
          ,[Date].[Calendar].[Calendar Year])
        ,[Date].[Calendar].CurrentMember.level)
      ,INCLUDEEMPTY)
</span></pre>
<p><b>Step 4 &#8211; Calculate the Run Rate</b></p>
<p>Calculating the prejected yearly total (run rate) is then a simple calculation</p>
<pre><span style="color: #008000;">
  MEMBER [Measures].[Full Year Run Rate] AS
    [Measures].[YTD Sales]
    * ([Measures].[TotalPeriods]
       /[Measures].[CurPeriod])
</span></pre>
<p>You can then put the whole lot together and see the results&#8230;</p>
<pre><span style="color: #008000;">
WITH

  MEMBER [Measures].[YTD Sales] AS
    AGGREGATE(
      YTD([Date].[Calendar].CurrentMember)
      ,[Measures].[Internet Sales Amount])

  MEMBER [Measures].[CurPeriod] AS
    COUNT(
      YTD([Date].[Calendar].CurrentMember)
      ,INCLUDEEMPTY)

  MEMBER [Measures].[TotalPeriods] AS
    COUNT(
      DESCENDANTS(
        ANCESTOR([Date].[Calendar].CurrentMember
          ,[Date].[Calendar].[Calendar Year])
        ,[Date].[Calendar].CurrentMember.level)
      ,INCLUDEEMPTY)

  MEMBER [Measures].[Full Year Run Rate] AS
    [Measures].[YTD Sales]
    * ([Measures].[TotalPeriods]
       /[Measures].[CurPeriod])

SELECT
{
     [Measures].[Internet Sales Amount]
    ,[Measures].[YTD Sales]
    ,[Measures].[Full Year Run Rate]
    ,[Measures].[CurPeriod]
    ,[Measures].[TotalPeriods]
} ON 0,
{
    DESCENDANTS([Date].[Calendar].[CY 2003])
} ON 1
FROM [Direct Sales]
</span></pre>
<p>In my next blog I&#8217;ll be diong the same calculation in DAX for use with PowerPivot, stay tuned&#8230;</p>
<p>Frog-Blog Out</p>
]]></content:encoded>
			<wfw:commentRss>http://www.purplefrogsystems.com/blog/index.php/2010/08/calculate-run-rate-full-year-projection-in-mdx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Seagate Momentus XT Hybrid Drive</title>
		<link>http://www.purplefrogsystems.com/blog/index.php/2010/08/seagate-momentus-xt-hybrid-drive/</link>
		<comments>http://www.purplefrogsystems.com/blog/index.php/2010/08/seagate-momentus-xt-hybrid-drive/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 13:20:06 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[Hard disk]]></category>
		<category><![CDATA[laptop]]></category>
		<category><![CDATA[Momentus XT]]></category>
		<category><![CDATA[seagate]]></category>

		<guid isPermaLink="false">http://www.purplefrogsystems.com/blog/?p=147</guid>
		<description><![CDATA[I thought I&#8217;d take a break from writing posts about Business Intelligence and SQL Server, and instead share with you my elation at finding a laptop hard disk that quite simply makes the world a better place, the Seagate Momentus XT hybrid drive.
When I purchased my curent laptop (Dell XPS M1530 if you&#8217;re interested, with [...]]]></description>
			<content:encoded><![CDATA[<p>I thought I&#8217;d take a break from writing posts about Business Intelligence and SQL Server, and instead share with you my elation at finding a laptop hard disk that quite simply makes the world a better place, the Seagate Momentus XT hybrid drive.</p>
<p>When I purchased my curent laptop (Dell XPS M1530 if you&#8217;re interested, with 4Gb RAM) I was presented with a choice between a fast 7200rpm 200Gb drive or a slower 5400rpm 320Gb drive. Due to the size of the databases I tend to work with I had to opt for the larger of the two, a Western Digital Caviar, taking the hit on performance.</p>
<p>I&#8217;ve been tempted for a while to upgrade the disk to a 7200rpm but have been secretly holding out (in vain) for solid state disks to increase in size and performance whilst decrease in price. £600 for a 256Gb SSD still renders them too expensive and too small to be an effective option for my needs. 512Gb drives are expected soon, but with a price tag of over £1000. No thanks.</p>
<p><img class="alignleft size-full wp-image-148" title="seagatemomentusxt" src="http://www.purplefrogsystems.com/blog/wp-content/uploads/2010/08/seagatemomentusxt.jpg" alt="" width="124" height="124" />Enter Seagate, with their Momentus XT hybrid drive which is now available in the UK. The 500Gb version (also available in 250Gb and 320Gb) is a standard laptop sized 2.5&#8243; drive which combines 4Gb of super fast SLC NAND solid state storage alongside a 500Gb traditional 7200rpm drive. It also has 32Mb of drive-level cache. The drive monitors disk usage and automatically uses the SSD for the most commonly used files, without any help or drivers on the operating system. Thus you get the size/cost benefit of a standard drive but the performance boost of an SSD for your most accessed files. And all this for less than £100&#8230; How could I resist?!</p>
<p>After a weekend of reinstalling Windows 7 Ultimate (x64), Office 2010, SQL 2008 R2 and the usual plethora of other software, the results are quite simply staggering. My previous setup would let me login to Windows after 60 seconds, but I had to wait a total of 7.5 minutes until Outlook was open and usable. In the new setup I can login to Windows after 35 seconds, and Outlook is open and usable in under 1.5 minutes. 6 minutes saved per day just on bootup. That&#8217;s a whole 24 hours per year.</p>
<p>I have to place a caveat here, that there are a number of software differences between the two systems so it&#8217;s not by any means a scientific test. My old system was XP Pro x86 and the new one is Windows 7 Ultimate x64, I&#8217;ve changed SQL Server 2008 to 2008R2, and all the drivers/software are 64 bit instead of 32 bit. This will certainly make a difference on its own so the performance is not entirely down to the drive, however I have to assume that it takes the majority of the credit. Every detailed review that I&#8217;ve seen reports average performance as pretty much mid-way between a 7200rpm and a SSD disk.</p>
<p>The only downside is that I&#8217;ve now got to spend a few more weekends upgrading the other company laptops!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.purplefrogsystems.com/blog/index.php/2010/08/seagate-momentus-xt-hybrid-drive/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>MDX Calculated Member Spanning Multiple Date Dimensions</title>
		<link>http://www.purplefrogsystems.com/blog/index.php/2010/08/mdx-calculated-member-spanning-multiple-date-dimensions/</link>
		<comments>http://www.purplefrogsystems.com/blog/index.php/2010/08/mdx-calculated-member-spanning-multiple-date-dimensions/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 17:09:51 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Analysis Services]]></category>
		<category><![CDATA[Calculated Member]]></category>
		<category><![CDATA[MDX]]></category>
		<category><![CDATA[Semi Additive]]></category>
		<category><![CDATA[SSAS]]></category>
		<category><![CDATA[Time Dimension]]></category>

		<guid isPermaLink="false">http://www.purplefrogsystems.com/blog/?p=140</guid>
		<description><![CDATA[It’s common in most cubes to have a number of different date dimensions, whether role playing, distinct, or a combination of both. Say for example, Entry Date, Posting Date and Accounting Period. There may also be numerous hierarchies in each date dimension, such as calendar and fiscal calendar, leading to a relatively complicated array of [...]]]></description>
			<content:encoded><![CDATA[<p>It’s common in most cubes to have a number of different date dimensions, whether role playing, distinct, or a combination of both. Say for example, Entry Date, Posting Date and Accounting Period. There may also be numerous hierarchies in each date dimension, such as calendar and fiscal calendar, leading to a relatively complicated array of dates to worry about when calculating semi-additive measures.</p>
<p>If we create a date related calculation (i.e. total to date) how do we ensure that this calculation works across all date dimensions?</p>
<p>Lets assume we have a stock movement measure, where each record in the fact table is the change in stock (plus or minus). The current stock level is found by using a calculation totaling every record to date.</p>
<pre><span style="color: #008000;">CREATE MEMBER CURRENTCUBE.[Measures].[Stock Level]
AS
  SUM({NULL:[Date].[Calendar].CurrentMember}
     , [Measures].[Stock Movement]
  );
</span></pre>
<p>[Note that {NULL:xxx} just creates a set of everything before the xxx member, i.e. everything to date]</p>
<p>This works just fine, if the user selects the [Date].[Calendar] hierarchy. What if the user selects the [Date].[Fiscal] hierarchy, or the [Period] dimension? Basically the calculation wont work, as the MDX expression is only aware of the [Date].[Calendar] hierarchy.</p>
<p>The simple solution is to use the Aggregate function over all of the dimensions that the calculation needs to be aware of:</p>
<pre><span style="color: #008000;">CREATE MEMBER CURRENTCUBE.[Measures].[Stock Level]
AS
  AGGREGATE(
      {NULL:[Date].[Fiscal].CurrentMember}
       * {NULL:[Date].[Calendar].CurrentMember}
       * {NULL:[Period].[Period].CurrentMember}
    , [Measures].[Stock Movement]
  );
</span></pre>
<p>The calculation will then use whichever date or time hierarchy is selected. It will even cope if multiple dimensions are selected, say the calendar on 0 and the periods on 1, both axis will honor the aggregation as expected.</p>
<p>Frog-Blog out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.purplefrogsystems.com/blog/index.php/2010/08/mdx-calculated-member-spanning-multiple-date-dimensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Data Warehousing: Kimball vs Inmon</title>
		<link>http://www.purplefrogsystems.com/blog/index.php/2010/08/data-warehousing-kimball-vs-inmon/</link>
		<comments>http://www.purplefrogsystems.com/blog/index.php/2010/08/data-warehousing-kimball-vs-inmon/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 12:08:28 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Business Intelligence]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Data Warehouse]]></category>
		<category><![CDATA[Inmon]]></category>
		<category><![CDATA[Kimball]]></category>

		<guid isPermaLink="false">http://www.purplefrogsystems.com/blog/?p=125</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div class="mceTemp" style="text-align: center; font-style: italic; font-size: smaller;"</p>
<div id="attachment_126" class="wp-caption alignleft" style="width: 170px"><a href="http://www.purplefrogsystems.com/blog/wp-content/uploads/2010/08/bill_inmon_160.jpg"><img class="size-full wp-image-126" title="Bill Inmon" src="http://www.purplefrogsystems.com/blog/wp-content/uploads/2010/08/bill_inmon_160.jpg" alt="Bill Inmon" width="160" height="199" /></a><p class="wp-caption-text">Bill Inmon</p></div>
</div>
<p>Anyone involved in the Business Intelligence space has had their head in the sand if they are not aware of the long running, and more often than not misunderstood, debate between the two conceptual models of data warehouse design.</p>
<p>Bill Inmon has recently posted an article on <a href="http://www.b-eye-network.mobi/view/14115" target="_blank">www.b-eye-network.com</a> discussing the matter, and to his credit, has tried to put forward a number of balanced pros and cons of each methodology.</p>
<p>I&#8217;ll state now that I&#8217;m a big advocate of a hybrid approach, taking elements from both Imnon and Kimball camps and selecting the right approach for each unique project depending on the requirements and purpose of the warehouse. I therefore appreciate both sides of the debate, and am not going to jump to the defence of either side. Having said that, most projects more often than not have a weighting towards Kimball due to the time pressures imposed by clients.</p>
<p>Bill nicely simmarises the key elements of each approach as:</p>
<blockquote><p>The Kimball approach to database design and development is typified by the star schema design of databases. There are fact tables and dimension tables. In a complex environment, there are snowflake structures, which are merely extended versions of the star schema. In order to resolve differences of granularity between fact tables, conformed dimensions are used. Staging areas are occasionally used to capture raw data before the placement of the data into a Kimball style data mart.</p></blockquote>
<blockquote><p>The Inmon approach to data warehousing centers around a relational, non redundant, granular, integrated design of detailed data. From this base of data, data marts are spun off to different departments according to their individual analytical needs. In recent vintage, with DW 2.0, the Inmon approach calls for the recognition of the life cycle of data within the data warehouse, the inclusion and integration of unstructured data within the data warehouse, and the close integration of metadata into the data warehouse infrastructure.</p></blockquote>
<div id="attachment_127" class="wp-caption alignleft" style="width: 170px"><a href="http://www.purplefrogsystems.com/blog/wp-content/uploads/2010/08/ralph_kimball_160.jpg"><img class="size-full wp-image-127" title="Ralph Kimball" src="http://www.purplefrogsystems.com/blog/wp-content/uploads/2010/08/ralph_kimball_160.jpg" alt="Ralph Kimball" width="160" height="208" /></a><p class="wp-caption-text">Ralph Kimball</p></div>
<p>He then proceeds to present a brief comparitive assessment of the pros and cons of each. I don&#8217;t entirely agree with the black and white nature of the comparisons as most items are a shade of grey in both camps, but it certainly provides a good starting point for those that are starting out in the BI field and want to know more about whhat this debate is alll about.</p>
<p>Possibly the most interesting item (certainly from a business intelligence consultant&#8217;s perspective) is Bill&#8217;s renewed call for an open, public debate between Bill and Ralph &#8211; It gets my vote!</p>
<p>Thanks to Graham Bradfield at Computer People for pointing me towards this article in his BI newsletter.</p>
<p>View the full article here: <a href="http://www.b-eye-network.mobi/view/14115" target="_blank">Data Warehousing: Kimball vs Inmon</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.purplefrogsystems.com/blog/index.php/2010/08/data-warehousing-kimball-vs-inmon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Leap before you can land</title>
		<link>http://www.purplefrogsystems.com/blog/index.php/2010/07/leap-before-you-can-land/</link>
		<comments>http://www.purplefrogsystems.com/blog/index.php/2010/07/leap-before-you-can-land/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 13:10:57 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Business Intelligence]]></category>
		<category><![CDATA[Frog]]></category>

		<guid isPermaLink="false">http://www.purplefrogsystems.com/blog/?p=119</guid>
		<description><![CDATA[Leap before you can land…
Research scientists at the Southern Illinois University have concluded that primitive frogs learned to jump before they learned to land. The result being a rather inelegant crash landing. I’m sure the frogs were happy that they achieved their goal of getting from A to B, but I do feel sorry for [...]]]></description>
			<content:encoded><![CDATA[<p>Leap before you can land…</p>
<p>Research scientists at the Southern Illinois University have concluded that <a href=http://www.newscientist.com/article/dn19221-bellyflopping-frogs-shed-light-on-evolution.html?DCMP=OTC-rss&#038;nsref=online-news target=”_blank”>primitive frogs learned to jump before they learned to land</a>. The result being a rather inelegant crash landing. I’m sure the frogs were happy that they achieved their goal of getting from A to B, but I do feel sorry for them having to endure the presumably painful landing, not to mention the indignity of having the rest of the pond witness the proceedings!</p>
<p>What struck me about this story, aside from the obvious frog reference (albeit not purple!), was the parallel to Business Intelligence projects that we encounter time and time again. BI systems that are put in place, but whilst the project teams are basking in the glory of accomplishing their goal, often sporting a couple of bruises picked up along the way, the wider business looks on not really knowing what has just happened or understanding how the company or their department are going to benefit from this leap in technology.</p>
<p>Although BI, as both a business function and technical toolset, has long since reached maturity, its adoption within SMEs is still surprisingly in its youth. Most companies who embark on a BI project seem to do so either because they have been sold on a fantastic vision of the future of information management, or because they have a specific business need to solve. Whatever the reasons for initiating a BI project, there is often very little thought given to how this new information system is likely to impact the wider business, or how the system can be utilised to provide far more benefit than the original project scope called for.</p>
<p>There are two aspects to this impact, the pain and the gain.</p>
<h3>The gain</h3>
<p>When the company’s data is cleaned, consolidated and remodelled to make reporting and analysis more simple (one of the primary goals of a BI project), the tendency is to use that system to reproduce the company’s old static reports but in a slightly more glossy fashion, only faster and more accurate. This stops far short of what a good data warehouse or cube is capable of. Enter self-service BI.</p>
<p>Self-service BI essentially allows your employees to have a level of (secured) access to the underlying BI data, combined with the right tools to perform their own analysis. This enables them to not just consume their old static reports, but to pro-actively go digging for information, knowledge and a greater understanding of your company. Gone are the days when requiring a change to a report has to be documented, requested, specified, programmed, tested &#038; released. A well designed data warehouse and cube, along with the right client tools (often just Excel), enables a user to just do it themselves with the bare minimum of training (if any), whilst retaining the confidence that the resulting report is accurate; the warehouse/cube take care of ensuring the underlying business logic is right.</p>
<h3>The pain</h3>
<p>A data warehouse is, by definition, a combined set of data from a variety of source systems. This means that any change to the source systems must be assessed for their impact on the warehouse. After putting a sparkly new BI infrastructure in place, you don’t want it to fall over because someone changed the structure of a source database or extract file! This adds a layer of change control that may not have existed before, and can cause some headaches.</p>
<p>There is usually a moderately large requirement for business users’ time, both to help the BI architect to understand and model the business properly, and also in testing.</p>
<h3>Pain but no gain?</h3>
<p>So, if the benefits such as self service BI (with dashboards, data mining, KPIs, PowerPivot etc. etc) are not adopted and utilised, the business is left having made an impressive technology leap, but is then stuck with the impact on source systems, a bill, and confusion from staff who don’t see the benefit of getting their old reports via a different method. </p>
<p>Evolution taught the frog that by landing properly, he can quickly jump again to go even further, and avoid the pain in the meantime.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.purplefrogsystems.com/blog/index.php/2010/07/leap-before-you-can-land/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL User Group Session 24 June 2010</title>
		<link>http://www.purplefrogsystems.com/blog/index.php/2010/06/sql-user-group-session-24-june-2010/</link>
		<comments>http://www.purplefrogsystems.com/blog/index.php/2010/06/sql-user-group-session-24-june-2010/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 20:01:53 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Analysis Services]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Data Warehouse]]></category>
		<category><![CDATA[Modelling]]></category>
		<category><![CDATA[Star Schema]]></category>

		<guid isPermaLink="false">http://www.purplefrogsystems.com/blog/?p=117</guid>
		<description><![CDATA[I&#8217;m excited to be presenting another session to the South Wales SQL Server User Group.
On Thursday 24th June 2010, Eversheds in Cardiff are kindly hosting the event, to run from 18:45 to 21:00.
The event is free, and you&#8217;ll even get pizza thrown in &#8211; what more can you ask for? Oh yes, some BI content&#8230;
My [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m excited to be presenting another session to the South Wales SQL Server User Group.</p>
<p>On Thursday 24th June 2010, Eversheds in Cardiff are kindly hosting the event, to run from 18:45 to 21:00.<br />
The event is free, and you&#8217;ll even get pizza thrown in &#8211; what more can you ask for? Oh yes, some BI content&#8230;</p>
<p>My session will cover data warehouse modelling, including a number of hands on business case studies including transactional data, account balances and duration based data.</p>
<p>Please feel free to bring your own data modelling problems along and I&#8217;ll try and cover as many as I can.</p>
<p>Register for free here: <a href="http://www.sqlserverfaq.com/events/235/Data-warehouse-design-case-studies-Other-BI-related-session-TBC.aspx" target="_blank">http://www.sqlserverfaq.com/events/235/Data-warehouse-design-case-studies-Other-BI-related-session-TBC.aspx</a></p>
<p>Hope to see you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.purplefrogsystems.com/blog/index.php/2010/06/sql-user-group-session-24-june-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server 2008 R2 &#8211; PowerPivot and Master Data Services</title>
		<link>http://www.purplefrogsystems.com/blog/index.php/2010/05/sql-server-2008-r2-powerpivot-and-master-data-services/</link>
		<comments>http://www.purplefrogsystems.com/blog/index.php/2010/05/sql-server-2008-r2-powerpivot-and-master-data-services/#comments</comments>
		<pubDate>Tue, 18 May 2010 20:13:48 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Analysis Services]]></category>
		<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[Reporting Services]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[DAX]]></category>
		<category><![CDATA[Master Data Services]]></category>
		<category><![CDATA[PowerPivot]]></category>

		<guid isPermaLink="false">http://www.purplefrogsystems.com/blog/?p=114</guid>
		<description><![CDATA[Purple Frog spent a very interesting day at Microsoft last week, at one of their many events promoting the launch of SQL Server 2008 R2. Rafal Lukewiecki presented an entertaining (as always!) and informative series of talks covering the release, focusing on the enhanced Business Intelligence tools available.
The primary changes to note are

Power Pivot – [...]]]></description>
			<content:encoded><![CDATA[<p>Purple Frog spent a very interesting day at Microsoft last week, at one of their many events promoting the launch of SQL Server 2008 R2. Rafal Lukewiecki presented an entertaining (as always!) and informative series of talks covering the release, focusing on the enhanced Business Intelligence tools available.</p>
<p>The primary changes to note are</p>
<ul>
<li><strong>Power Pivot</strong> – An in memory, client side add-in to Excel, that allows users to create virtual cubes on their desktop and analyse over 100m records of data virtually instantly</li>
<li><strong>DAX </strong>– A new expression language, designed for non-technical (probably more realistically, semi-technical) users to extend pivot tables and power pivot tables without having to learn MDX</li>
<li><strong>Report Components</strong> – In a report consisting of a couple of tables, a chart and a few gauges (gauges, sparklines &amp; maps are all new features of SSRS), you can save each element as a component and re-use it in different reports. This should result in much less duplication of work.</li>
<li><strong>Report Builder 3</strong> – A thin-client tool allowing end users to create Reporting Services reports. This is a big enhancement over its predecessor s it is finally fully compatible with reports created in the Business Intelligence Development Studio (BIDS), including report components.</li>
<li><strong>Master Data Services</strong> – A centralised tool and database intended to provide governance of your organisation’s master data (centralised list of products, fiscal calendar, regions etc.).</li>
</ul>
<p>The enhancements to <strong>Reporting Services</strong> (SSRS) are very welcome, and should be of huge benefit to anyone either currently using SSRS or considering using it. I firmly believe that there are no comparable web based reporting engines that even come close for SME organisations when looking at the whole picture including cost of implementation, ease of use, flexibility and capability.</p>
<p><strong>Master Data Services</strong> as a concept has been around for a long time, but there has never been a tool available to organisations to effectively implement it. This is Microsoft’s first proper stab at delivering a workable solution, and although I’m a big fan of the concept, and have no doubt of its benefit to a SME, I’m yet to be convinced that the tool is ready for a large scale corporate environment. Time will tell how scalable and manageable the system is, and credit has to go to Microsoft for starting the ball rolling.</p>
<p>The most impressive addition is without a doubt <strong>PowerPivot</strong>. In a nutshell, it’s a user defined OLAP cube wrapped up within Excel 2010, running entirely in memory on a user’s workstation. If you’ve not yet played with it or seen a demo, I’ll try and elaborate for you… Think about loading Excel with 1 million rows, and then imagine sorting and filtering a number of those columns [cue going out to lunch whilst waiting for Excel to catch up]. With PowerPivot, you can sort and filter over 100 million rows of data almost in an instant – it’s very impressive indeed!</p>
<p>That’s the snazzy demo bit, but to reduce it to a glorified spreadsheet is very harsh indeed. It allows a user to import multiple data sources and combine them together into a single dimensional data model, PowerPivot will create your own personal cube, without you having to build a warehouse, without knowing anything about MDX, dimension hierarchies, attribute relationships, granularity etc. etc.</p>
<p>Microsoft’s vision and reason for creating this tool is self-service BI, allowing users to create their own cubes, data analysis environments and reporting systems. And this is where I start to have a problem…</p>
<p>I can’t remember the last time I designed a data warehouse, where I did not find significant data quality problems, conflicting data, missing data, duplicated data etc.. I also find it hard to think of a situation where an end user (even a power user) is sufficiently clued up about the intricacies of a source OLTP database to be able to extract the right data and know what to do with it. Or if they are, a dozen other people in different departments have a different idea about how things work, resulting in many different versions of the truth.</p>
<p>I’m therefore (for now!) sticking with the opinion that it is still absolutely vital for an organisation to provide a clean, consistent, dimensionally modelled data warehouse as the basis for their BI/MI infrastructure. Tools like PowerPivot then sit very nicely on top to provide an incredibly powerful and beneficial user experience, but to try and use the emergence of self-service BI tools to usher in a new ‘non-data warehouse’ era is a very dangerous route which I hope people will avoid.</p>
<p>In summary – this release brings with it a fantastic host of new tools, but with great power comes great responsibility…</p>
]]></content:encoded>
			<wfw:commentRss>http://www.purplefrogsystems.com/blog/index.php/2010/05/sql-server-2008-r2-powerpivot-and-master-data-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
