<?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>Purple Frog Systems &#187; Drillthrough</title>
	<atom:link href="http://www.purplefrogsystems.com/blog/tag/drillthrough/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.purplefrogsystems.com/blog</link>
	<description>Business Intelligence Consultancy</description>
	<lastBuildDate>Tue, 15 May 2012 11:49:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Debug MDX queries using Drillthrough in SSMS</title>
		<link>http://www.purplefrogsystems.com/blog/2011/02/debug-mdx-queries-using-drillthrough-in-ssms/</link>
		<comments>http://www.purplefrogsystems.com/blog/2011/02/debug-mdx-queries-using-drillthrough-in-ssms/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 18:30:31 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Analysis Services]]></category>
		<category><![CDATA[Cube]]></category>
		<category><![CDATA[Drillthrough]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[MDX]]></category>
		<category><![CDATA[OLAP]]></category>

		<guid isPermaLink="false">http://www.purplefrogsystems.com/blog/?p=311</guid>
		<description><![CDATA[One of the great features of using Excel to browse an SSAS OLAP cube is the drillthrough ability. If you double click on any cell of an OLAP pivot table, Excel will create a new worksheet containing the top 1000 fact records that went to make up the figure in the selected cell. N.B. The [...]]]></description>
			<content:encoded><![CDATA[<p>One of the great features of using Excel to browse an SSAS OLAP cube is the drillthrough ability. If you double click on any cell of an OLAP pivot table, Excel will create a new worksheet containing the top 1000 fact records that went to make up the figure in the selected cell.</p>
<p><img src="http://www.purplefrogsystems.com/blog/wp-content/uploads/2011/02/MDXDrillthrough0-1024x598.png" alt="" title="MDXDrillthrough0" width="600" height="350" class="aligncenter size-large wp-image-312" /></p>
<p>N.B. <a href="/blog/2010/03/excel-cube-pivot-drillthrough-limited-to-1000-rows/">The limit of 1000 rows can be altered</a>, as per one of my previous blog posts <a href="">here</a>.</p>
<p><br/></p>
<p>This feature is pretty well known, but not many folk realise how easy it is to reproduce this in SQL Server Management Studio (SSMS). All you need to do is prefix your query with DRILLTHROUGH.</p>
<p>i.e. Assuming an MDX query of</p>
<p class="code">SELECT [Measures].[Internet Sales Amount] ON 0<br />
FROM [Adventure Works]<br />
WHERE [Date].[January 1, 2004]
</p>
<p>Which returns the following results&#8230;</p>
<p><img src="http://www.purplefrogsystems.com/blog/wp-content/uploads/2011/02/MDXDrillthrough1.png" alt="" title="MDXDrillthrough1" width="406" height="153" class="aligncenter size-full wp-image-313" /></p>
<p>A query of</p>
<p class="code">DRILLTHROUGH<br />
SELECT [Measures].[Internet Sales Amount] ON 0<br />
FROM [Adventure Works]<br />
WHERE [Date].[January 1, 2004]
</p>
<p>Returns the records contributing to the total figure. Great for diagnosing problems with an MDX query.</p>
<p><img src="http://www.purplefrogsystems.com/blog/wp-content/uploads/2011/02/MDXDrillthrough2.png" alt="" title="MDXDrillthrough2" width="609" height="335" class="aligncenter size-full wp-image-314" /></p>
<p>By default, only the first 10,000 rows are returned, but you can override this using MAXROWS</p>
<p class="code">DRILLTHROUGH MAXROWS 500<br />
SELECT [Measures].[Internet Sales Amount] ON 0<br />
FROM [Adventure Works]<br />
WHERE [Date].[January 1, 2004]
</p>
<p>The columns that are returned are those defined in the Actions tab of the Cube Designer in BIDS (The Business Intelligence Development Studio).</p>
<p><img src="http://www.purplefrogsystems.com/blog/wp-content/uploads/2011/02/MDXDrillthrough31.png" alt="" title="MDXDrillthrough3" width="597" height="298" class="aligncenter size-full wp-image-321" /></p>
<p>If no action is defined, then the fact measures will be returned along with the keys that link to each relevant dimension, which tend not to be that helpful.</p>
<p><br/>
<p>You can override the returned columns by using the RETURN clause</p>
<pre>
<p class="code">DRILLTHROUGH
SELECT [Measures].[Internet Sales Amount] ON 0
FROM [Adventure Works]
WHERE [Date].[January 1, 2004]
RETURN
   [$Internet Sales Order Details].[Internet Sales Order]
  ,[$Sales Territory].[Sales Territory Region]
  ,NAME([$Product].[Product])
  ,KEY([$Product].[Product])
  ,UNIQUENAME([$Product].[Product])
  ,[Internet Sales].[Internet Sales Amount]
  ,[Internet Sales].[Internet Order Quantity]

</pre>
<p>
<img src="http://www.purplefrogsystems.com/blog/wp-content/uploads/2011/02/MDXDrillthrough41.png" alt="" title="MDXDrillthrough4" width="596" height="401" class="aligncenter size-full wp-image-320" /><br />
<br/></p>
<p>Note that there are some restrictions on what you can drill through</p>
<ul>
<li>You can&#8217;t drill through an expression/calculation, only a raw measure
<li>The MDX query needs to return a single cell (otherwise the cube does not know which one to drill through)
<li>The data returned will be at the lowest granularity of the cube&#8217;s fact table
</ul>
</p>
<p>To explain the last point further, the cube does not return the raw data from the underlying data warehouse, but a summary of the facts grouped by unique combination of the relevant dimensions. i.e. if a warehouse table containing individual sales (by date, product, customer &#038; store) is brought into a cube as a fact table that only has relationships with the date and product dimensions, then the cube drill through will return unique combinations of date and product, summarising sales for each combination. Extra granularity which the warehouse may contain (customer and store) will not be available.</p>
<p>Note that if you specify the RETURN columns, the rows are still returned at the lowest level of the fact table granularity, even if not all of the dimensions are brought out as columns. This may result in returning multiple identical records. Don&#8217;t worry, these will be distinct facts, just differentiated by a dimension/attribute that isn&#8217;t being returned.</p>
<p align="right">You can find out more on <a href="http://technet.microsoft.com/en-us/library/ms145964.aspx" target="_blank">TechNet here</a></p>
<p><br/></p>
<p>Frog-Blog Out</p>
]]></content:encoded>
			<wfw:commentRss>http://www.purplefrogsystems.com/blog/2011/02/debug-mdx-queries-using-drillthrough-in-ssms/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Excel Cube Pivot drillthrough limited to 1000 rows</title>
		<link>http://www.purplefrogsystems.com/blog/2010/03/excel-cube-pivot-drillthrough-limited-to-1000-rows/</link>
		<comments>http://www.purplefrogsystems.com/blog/2010/03/excel-cube-pivot-drillthrough-limited-to-1000-rows/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 09:17:45 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Analysis Services]]></category>
		<category><![CDATA[Cube]]></category>
		<category><![CDATA[Drillthrough]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Pivot]]></category>
		<category><![CDATA[SSAS]]></category>

		<guid isPermaLink="false">http://www.purplefrogsystems.com/blog/?p=95</guid>
		<description><![CDATA[When browsing a cube using Excel 2007, you can drillthrough the measures to display up to 1000 rows of the transaction level source data. I often get asked whether this limit of 1000 rows is configurable &#8211; well the good news is yes it is. There is an option in the actions tab of the [...]]]></description>
			<content:encoded><![CDATA[<p>When browsing a cube using Excel 2007, you can drillthrough the measures to display up to 1000 rows of the transaction level source data.</p>
<p>I often get asked whether this limit of 1000 rows is configurable &#8211; well the good news is yes it is.</p>
<p>There is an option in the actions tab of the BIDS cube designer which allows you to specify the maximum rows, but helpfully this is ignored by Excel. Instead, you have to set it in Excel when you create a pivot.</p>
<p>Just click &#8220;<strong>Options</strong>&#8221; on the &#8220;<strong>PivotTable Tools</strong>&#8221; ribon, then in the &#8220;<strong>Change Data Source</strong>&#8221; dropdown click on &#8220;<strong>Connection Properties</strong>&#8220;. In this screen, just change the &#8220;<strong>Maximum number of records to retrieve</strong>&#8221; property.</p>
<p><a href="/images/blog/excelpivotdrillthrough.png"><img class="aligncenter size-full wp-image-96" title="excelpivotdrillthrough" src="/images/blog/excelpivotdrillthrough.png" alt="Excel 2007 Pivot Options" width="458" height="662" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.purplefrogsystems.com/blog/2010/03/excel-cube-pivot-drillthrough-limited-to-1000-rows/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Open SSRS report in a new Window</title>
		<link>http://www.purplefrogsystems.com/blog/2007/12/open-ssrs-report-in-a-new-window/</link>
		<comments>http://www.purplefrogsystems.com/blog/2007/12/open-ssrs-report-in-a-new-window/#comments</comments>
		<pubDate>Thu, 20 Dec 2007 11:44:39 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Reporting Services]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Drillthrough]]></category>
		<category><![CDATA[New Window]]></category>
		<category><![CDATA[Report Link]]></category>
		<category><![CDATA[URL]]></category>

		<guid isPermaLink="false">http://www.purplefrogsystems.com/blog/?p=7</guid>
		<description><![CDATA[There isn&#8217;t yet a built-in facility within Reporting Services to open a report link (i.e. a drillthrough report) in a new browser window or tab, however it isn&#8217;t too tricky to get this to work using a bit of javascript. javascript:void(window.open(Destination,&#8217;_blank&#8217;)) My preferred method is to wrap this up into a custom code function such [...]]]></description>
			<content:encoded><![CDATA[<p>There isn&#8217;t yet a built-in facility within Reporting Services to open a report link (i.e. a drillthrough report) in a new browser window or tab, however it isn&#8217;t too tricky to get this to work using a bit of javascript.</p>
<p><span style="color: #339966;"> javascript:void(window.open(Destination,&#8217;_blank&#8217;))</span></p>
<p>My preferred method is to wrap this up into a custom code function such as</p>
<p><span style="color: #339966;"> Function OpenURL(ByVal URL As String) As String<br />
Return &#8220;javascript:void(window.open(&#8216;&#8221; &amp; URL &amp; &#8220;&#8216;,&#8217;_blank&#8217;))&#8221;<br />
End Function</span></p>
<p>In your report, you can then just set the navigation property to jump to a URL of a website:</p>
<p><span style="color: #339966;"> =Code.OpenURL(&#8220;<a href="http://www.purplefrogsystems.com">http://www.purplefrogsystems.com</a>&#8220;)</span></p>
<p>Or to the path of a the drillthrough report:</p>
<p><span style="color: #339966;"> =Code.OpenURL(&#8220;http://[Your Server]/ReportServer?/Folder/ReportName&amp;rs:Command=Render&#8221;)</span></p>
<p>If you have parameters that you need to pass in, you can add these into the URL either fixed or dynamic:</p>
<p><span style="color: #339966;"> =Code.OpenURL(&#8220;http://[Your Server]/ReportServer?/Folder/ReportName&amp;rs:Command=Render &amp;MyFirstParam=Value1&amp;MySecondParam=&#8221; &amp; Fields!MyField.Value)</span></p>
<p>Please note that this will not work in the BIDS development environment, it will only work once you have deployed the report to the Report Server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.purplefrogsystems.com/blog/2007/12/open-ssrs-report-in-a-new-window/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

