<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Kasper de Jonge PowerPivot Blog</title>
	
	<link>http://www.powerpivotblog.nl</link>
	<description>Bringing BI to the masses</description>
	<lastBuildDate>Tue, 27 Mar 2012 15:13:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/kjonge" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="kjonge" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Help I cannot find the BI Semantic Model Connection File in SharePoint</title>
		<link>http://www.powerpivotblog.nl/help-i-cannot-find-the-bi-semantic-model-connection-file-in-sharepoint</link>
		<comments>http://www.powerpivotblog.nl/help-i-cannot-find-the-bi-semantic-model-connection-file-in-sharepoint#comments</comments>
		<pubDate>Mon, 26 Mar 2012 16:33:43 +0000</pubDate>
		<dc:creator>Kasper de Jonge</dc:creator>
				<category><![CDATA[PowerPivot]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.powerpivotblog.nl/?p=2513</guid>
		<description><![CDATA[Some question I see popping up every now and then is &#8220;I have configured a Tabular model on SQL 2012 and also installed SharePoint 2010 with SP1 but I am able to view “BI Semantic Model Connection File” file in SharePoint. What is happening ?&#8221; The problem is usually pretty easy to fix: You can go through the steps [...]]]></description>
			<content:encoded><![CDATA[<p>Some question I see popping up every now and then is &#8220;I have configured a Tabular model on SQL 2012 and also installed SharePoint 2010 with SP1 but I am able to view “BI Semantic Model Connection File” file in SharePoint. What is happening ?&#8221;</p>
<p>The problem is usually pretty easy to fix: You can go through the steps mentioned here: <a href="http://blogs.msdn.com/b/karang/archive/2012/01/27/add-a-bi-semantic-model-connection-content-type-to-a-library-powerpivot-for-sharepoint.aspx">http://blogs.msdn.com/b/karang/archive/2012/01/27/add-a-bi-semantic-model-connection-content-type-to-a-library-powerpivot-for-sharepoint.aspx</a> .  If even so, you are not able to see them, try to activate the PowerPivot features in your site collection.</p>
<p>&nbsp;</p>
<img src="http://www.powerpivotblog.nl/?ak_action=api_record_view&id=2513&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/kjonge/~4/ro-9MoFYNI8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.powerpivotblog.nl/help-i-cannot-find-the-bi-semantic-model-connection-file-in-sharepoint/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Quickly Retrieving the Row Count for All Tables in a SQL Database</title>
		<link>http://www.powerpivotblog.nl/quickly-retrieving-the-row-count-for-all-tables-in-sql-database</link>
		<comments>http://www.powerpivotblog.nl/quickly-retrieving-the-row-count-for-all-tables-in-sql-database#comments</comments>
		<pubDate>Fri, 23 Mar 2012 16:15:13 +0000</pubDate>
		<dc:creator>Kasper de Jonge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.powerpivotblog.nl/?p=2515</guid>
		<description><![CDATA[A quick post that proved helpful to me today. I needed to see the number of rows for all tables in the database. I found this query: SELECT &#8216;[' + SCHEMA_NAME(t.schema_id) + '].[' + t.name + ']&#8216; AS fulltable_name, SCHEMA_NAME(t.schema_id) AS schema_name, t.name AS table_name, i.rows FROM sys.tables AS t INNER JOIN sys.sysindexes AS i ON t.object_id [...]]]></description>
			<content:encoded><![CDATA[<p>A quick post that proved helpful to me today. I needed to see the number of rows for all tables in the database. I found this query:</p>
<blockquote><p>SELECT &#8216;[' + SCHEMA_NAME(t.schema_id) + '].[' + t.name + ']&#8216; AS fulltable_name, SCHEMA_NAME(t.schema_id) AS schema_name, t.name AS table_name,<br />
i.rows<br />
FROM sys.tables AS t INNER JOIN<br />
sys.sysindexes AS i ON t.object_id = i.id AND i.indid &lt; 2</p></blockquote>
<p>on Brian Knights blog: <a href="http://whiteknighttechnology.com/cs/blogs/brian_knight/archive/2005/12/21/38.aspx">Quickly Retrieving the Row Count for All Tables</a>. One thing to note is that the numbers could be a little out of date. DBCC UPDATEUSAGE (DBNAME) should resolve that, the problem is that this only works when you are admin. If you want to be 100% accurate you might need to do a little more investigation.</p>
<img src="http://www.powerpivotblog.nl/?ak_action=api_record_view&id=2515&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/kjonge/~4/9GweoOR9ot8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.powerpivotblog.nl/quickly-retrieving-the-row-count-for-all-tables-in-sql-database/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Online session: Building the Perfect Tabular BI Semantic Model for Power View</title>
		<link>http://www.powerpivotblog.nl/online-session-building-the-perfect-tabular-bi-semantic-model-for-power-view</link>
		<comments>http://www.powerpivotblog.nl/online-session-building-the-perfect-tabular-bi-semantic-model-for-power-view#comments</comments>
		<pubDate>Sun, 11 Mar 2012 23:51:56 +0000</pubDate>
		<dc:creator>Kasper de Jonge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.powerpivotblog.nl/?p=2511</guid>
		<description><![CDATA[Besides session on Analysis they also released a 9 module Microsoft Virtual Academy session Breakthrough Insights using Microsoft SQL Server 2012 &#8211; Reporting Services Module 5 there is one I did and is called: Building the Perfect BI Semantic Model for Power View. This session will go into the depth of how you can build the perfect Tabular model that [...]]]></description>
			<content:encoded><![CDATA[<p>Besides session on Analysis they also released a 9 module Microsoft Virtual Academy session <a href="https://www.microsoftvirtualacademy.com/tracks/breakthrough-insights-using-microsoft-sql-server-2012-reporting-services">Breakthrough Insights using Microsoft SQL Server 2012 &#8211; Reporting Services</a></p>
<p>Module 5 there is one I did and is called: <a title="Building the Perfect BI Semantic Model for Power View">Building the Perfect BI Semantic Model for Power View. This session will go into the depth of how you can build the perfect Tabular model that will create the best Power View experience for your end users.</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<img src="http://www.powerpivotblog.nl/?ak_action=api_record_view&id=2511&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/kjonge/~4/IepLXNP2rgM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.powerpivotblog.nl/online-session-building-the-perfect-tabular-bi-semantic-model-for-power-view/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Online session: Enriching your BI Semantic Models with Data Analysis Expressions (DAX)</title>
		<link>http://www.powerpivotblog.nl/online-session-enriching-your-bi-semantic-models-with-data-analysis-expressions</link>
		<comments>http://www.powerpivotblog.nl/online-session-enriching-your-bi-semantic-models-with-data-analysis-expressions#comments</comments>
		<pubDate>Sat, 10 Mar 2012 00:49:10 +0000</pubDate>
		<dc:creator>Kasper de Jonge</dc:creator>
				<category><![CDATA[PowerPivot]]></category>

		<guid isPermaLink="false">http://www.powerpivotblog.nl/?p=2507</guid>
		<description><![CDATA[As part of the SQL Server 2012 release Microsoft has released sessions on the Microsoft Virtual Academy one of the is sessions is 7 Module session on Breakthrough Insights using Microsoft SQL Server 2012 &#8211; Analysis One of the session there is one I did together with my colleague Howie Dickerman called: Enriching your BI Semantic Models with Data Analysis Expressions. [...]]]></description>
			<content:encoded><![CDATA[<p>As part of the SQL Server 2012 release Microsoft has released sessions on the Microsoft Virtual Academy one of the is sessions is 7 Module session on <a href="https://www.microsoftvirtualacademy.com/tracks/breakthrough-insights-using-microsoft-sql-server-2012-analysis-services">Breakthrough Insights using Microsoft SQL Server 2012 &#8211; Analysis</a></p>
<p>One of the session there is one I did together with my colleague Howie Dickerman called: Enriching your BI Semantic Models with Data Analysis Expressions. This will give you a basic understanding of DAX and will go through the new features of DAX for SQL Server 2012.</p>
<p>&nbsp;</p>
<p>Enjoy !</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<img src="http://www.powerpivotblog.nl/?ak_action=api_record_view&id=2507&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/kjonge/~4/OuwMWGlCJBE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.powerpivotblog.nl/online-session-enriching-your-bi-semantic-models-with-data-analysis-expressions/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server 2012 launched !</title>
		<link>http://www.powerpivotblog.nl/sql-server-2012-launched</link>
		<comments>http://www.powerpivotblog.nl/sql-server-2012-launched#comments</comments>
		<pubDate>Tue, 06 Mar 2012 17:27:27 +0000</pubDate>
		<dc:creator>Kasper de Jonge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.powerpivotblog.nl/?p=2498</guid>
		<description><![CDATA[As of today you can download a evaluation version SQL Server 2012.  For purchasing SQL Server 2012 you have to wait until April first. For more information check out the official blog post: SQL Server 2012 Released This is the first SQL Server release I am proud to be part of, the AS team has delivered tons of new [...]]]></description>
			<content:encoded><![CDATA[<p>As of today you can download a evaluation version SQL Server 2012.  For purchasing SQL Server 2012 you have to wait until April first. For more information check out the official blog post: <a title="SQL Server 2012 Released" href="http://blogs.technet.com/b/stbnewsbytes/archive/2012/03/06/microsoft-releases-sql-server-2012-drives-advancements-in-big-data.aspx">SQL Server 2012 Released</a></p>
<p>This is the first SQL Server release I am proud to be part of, the AS team has delivered tons of new features in the BISM, tabular projects, Power View integration, more DAX and of course a new version of the PowerPivot add-in. I think this is great release for BI with Power View now added to the stack as great interactive data exploration, visualization, and presentation experience.</p>
<p>This release also includes the long awaited 64 bits version of the Data mining add-in, which you can download <a href="http://www.microsoft.com/download/en/details.aspx?id=29061">here</a>.</p>
<p>PowerPivot for SQL Server 2012 is now here as well, you can download it <a href="http://www.microsoft.com/download/en/details.aspx?id=29074">here</a>.</p>
<img src="http://www.powerpivotblog.nl/?ak_action=api_record_view&id=2498&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/kjonge/~4/7LD00ZTkMdg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.powerpivotblog.nl/sql-server-2012-launched/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What is using all that memory on my Analysis server instance ?</title>
		<link>http://www.powerpivotblog.nl/what-is-using-all-that-memory-on-my-analysis-server-instance</link>
		<comments>http://www.powerpivotblog.nl/what-is-using-all-that-memory-on-my-analysis-server-instance#comments</comments>
		<pubDate>Sun, 26 Feb 2012 06:49:53 +0000</pubDate>
		<dc:creator>Kasper de Jonge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.powerpivotblog.nl/?p=2476</guid>
		<description><![CDATA[With the release of SQL Server 2012 tabular models identifying what the memory use of objects on your server instance is has become more important then ever. Since everything is in memory, being able to tune the model to remove columns that take up loads of memory could be very valuable. Or being able to use [...]]]></description>
			<content:encoded><![CDATA[<p>With the release of SQL Server 2012 tabular models identifying what the memory use of objects on your server instance is has become more important then ever. Since everything is in memory, being able to tune the model to remove columns that take up loads of memory could be very valuable. Or being able to use your development database to extrapolate the memory usage that you will have on you product machine.</p>
<p>I have created a PowerPivot workbook that will allow you to investigate the memory usage on your server instance (this report could also be used on a MOLAP instance).</p>
<p>The report contains two worksheets. Worksheet 1 contains two dashboards, the first dashboard contains the top 10 tables on the server instance by memory usage.</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2012/02/dashboard-1.png"><img class="alignnone  wp-image-2479" title="dashboard 1" src="http://www.powerpivotblog.nl/wp-content/uploads/2012/02/dashboard-1.png" alt="" width="690" height="461" /></a></p>
<p>The second worksheet allows a more detailed investigation on all the objects on the server by using a pivottable. I have created a hierarchy of all the objects that allows to start at the top to bottom when you want to investigate the details.</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2012/02/dashboard-2.png"><img class="alignnone  wp-image-2480" title="dashboard 2" src="http://www.powerpivotblog.nl/wp-content/uploads/2012/02/dashboard-2.png" alt="" width="651" height="517" /></a></p>
<p>of course since this is a pivottable there you can create your own insights if you want:</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2012/02/table.png"><img class="alignnone size-full wp-image-2484" title="table" src="http://www.powerpivotblog.nl/wp-content/uploads/2012/02/table.png" alt="" width="260" height="441" /></a></p>
<p>&nbsp;</p>
<p>You can download the workbook and try for you self here <a href="http://www.powerpivotblog.nl/what-is-using-all-that-memory-on-my-analysis-server-instance/bismservermemoryreport" rel="attachment wp-att-2481">BISMServerMemoryReport</a>.</p>
<p>In order to get this working on your tabular or multidimensional server is change the connection:</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2012/02/conn.png"><img class="alignnone  wp-image-2485" title="conn" src="http://www.powerpivotblog.nl/wp-content/uploads/2012/02/conn.png" alt="" width="441" height="469" /></a></p>
<p>After this, refresh the table and refresh the data in the workbooks from Excel.</p>
<p>The data itself is being retrieved into one table by a DMV function:</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2012/02/query.png"><img class="alignnone  wp-image-2486" title="query" src="http://www.powerpivotblog.nl/wp-content/uploads/2012/02/query.png" alt="" width="600" height="429" /></a></p>
<p>Then the data that came in was manipulated by several DAX calculated columns using new SQL 2012 DAX functions like parent child functions and created hierarchies for them.</p>
<p>I hope you can use this workbook, let me know if you have any comments or feedback on the report. I am always looking for new insights and ways to improve the workbook.</p>
<img src="http://www.powerpivotblog.nl/?ak_action=api_record_view&id=2476&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/kjonge/~4/quFwWmv_WVU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.powerpivotblog.nl/what-is-using-all-that-memory-on-my-analysis-server-instance/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Learn PowerPivot DAX Basics in 30 Minutes</title>
		<link>http://www.powerpivotblog.nl/learn-dax-basics-in-30-minutes</link>
		<comments>http://www.powerpivotblog.nl/learn-dax-basics-in-30-minutes#comments</comments>
		<pubDate>Fri, 27 Jan 2012 04:57:37 +0000</pubDate>
		<dc:creator>Kasper de Jonge</dc:creator>
				<category><![CDATA[DAX]]></category>

		<guid isPermaLink="false">http://www.powerpivotblog.nl/?p=2471</guid>
		<description><![CDATA[Are you new to data modeling in PowerPivot or SQL Server Data Tool (aka BIDS) or never had the chance to start with DAX, now is the time.  We have released online content to help you get started in creating DAX formulas. You can think of this as DAX 101. The QuickStart: Learn DAX Basics [...]]]></description>
			<content:encoded><![CDATA[<p>Are you new to data modeling in PowerPivot or SQL Server Data Tool (aka BIDS) or never had the chance to start with DAX, now is the time.  We have released online content to help you get started in creating DAX formulas. You can think of this as DAX 101.</p>
<p>The <a href="http://social.technet.microsoft.com/wiki/contents/articles/7040.quickstart-learn-dax-basics-in-30-minutes.aspx">QuickStart: Learn DAX Basics in 30 Minutes</a> is now available as part of the <a href="http://social.technet.microsoft.com/wiki/contents/articles/1088.dax-resource-center.aspx">DAX Resource Center</a> Wiki.</p>
<p>Leave a comment if you have some feedback, its a online Wiki so we can change it <img src='http://www.powerpivotblog.nl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<img src="http://www.powerpivotblog.nl/?ak_action=api_record_view&id=2471&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/kjonge/~4/GmoDV17U_9g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.powerpivotblog.nl/learn-dax-basics-in-30-minutes/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Whitepaper and Samples Released: Data Analysis Expressions (DAX) In the Tabular BI Semantic Model</title>
		<link>http://www.powerpivotblog.nl/whitepaper-and-samples-released-data-analysis-expressions-dax-in-the-tabular-bi-semantic-model</link>
		<comments>http://www.powerpivotblog.nl/whitepaper-and-samples-released-data-analysis-expressions-dax-in-the-tabular-bi-semantic-model#comments</comments>
		<pubDate>Wed, 04 Jan 2012 20:56:02 +0000</pubDate>
		<dc:creator>Kasper de Jonge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.powerpivotblog.nl/?p=2469</guid>
		<description><![CDATA[An updated version of the whitepaper “Data Analysis Expressions (DAX) In the Tabular BI Semantic Model” is available for download at http://go.microsoft.com/fwlink/?LinkID=237472&#38;clcid=0&#215;409. The Whitepaper is now updated with SQL Server 2012 DAX functions and well worth the read if you are interested in DAX (which you no doubt are if you are following my blog). Thanks [...]]]></description>
			<content:encoded><![CDATA[<p>An updated version of the whitepaper “<em>Data Analysis Expressions (DAX) In the Tabular BI Semantic Model</em>” is available for download at <a href="http://go.microsoft.com/fwlink/?LinkID=237472&amp;clcid=0x409">http://go.microsoft.com/fwlink/?LinkID=237472&amp;clcid=0&#215;409</a>.</p>
<p>The Whitepaper is now updated with SQL Server 2012 DAX functions and well worth the read if you are interested in DAX (which you no doubt are if you are following my blog). Thanks to Peter Meyers and Howie Dickerman for writing this whitepaper and Owen Duncan for contributing to it.</p>
<img src="http://www.powerpivotblog.nl/?ak_action=api_record_view&id=2469&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/kjonge/~4/m32mbbemZQk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.powerpivotblog.nl/whitepaper-and-samples-released-data-analysis-expressions-dax-in-the-tabular-bi-semantic-model/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Why do I blog</title>
		<link>http://www.powerpivotblog.nl/why-do-i-blog</link>
		<comments>http://www.powerpivotblog.nl/why-do-i-blog#comments</comments>
		<pubDate>Wed, 04 Jan 2012 05:59:59 +0000</pubDate>
		<dc:creator>Kasper de Jonge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.powerpivotblog.nl/?p=2465</guid>
		<description><![CDATA[ok ok, I am much to late to the party for #meme15 by Jason Strate From the post by Jason: #meme15 is dedicated to discussing and sharing tips and tricks for blogging and using social media.  This can be from a personal or professional standpoint.  The intent is that through these posts by myself and others will provide [...]]]></description>
			<content:encoded><![CDATA[<p>ok ok, I am much to late to the party for <a href="http://twitter.com/#!/search/realtime/%23meme15">#meme15</a> by <a href="http://www.jasonstrate.com/2011/12/the-meme15-round-up/ ">Jason Strate</a></p>
<p>From the post by Jason:</p>
<p><a href="http://twitter.com/#!/search/realtime/%23meme15">#meme15</a> is dedicated to discussing and sharing tips and tricks for blogging and using social media.  This can be from a personal or professional standpoint.  The intent is that through these posts by myself and others will provide some insight into how to succeed in these areas.</p>
<p>This month’s writing assignment was:</p>
<ul>
<li>Why did I start blogging?</li>
<li>Why do I currently blog?</li>
</ul>
<p>I was reading the excellent <a href="http://www.jenstirrup.com/2011/12/blogging-is-two-way-conversation.html">blog post by Jen Stirrup</a> that sparked me to share my experiences as well.</p>
<p><strong>Why did I start blogging?</strong></p>
<p>I started blogging on November 1st 2007 to share the things I found on the internet with colleagues, customers and myself <img src='http://www.powerpivotblog.nl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  At the time  I was working as a consultant and I visited customers who were not as much into blogs and the internet as I was. This gave me the opportunity to share what I found, but at this point it was just aggregating other blogs.</p>
<p>Around 2009 I started writing a little bit more substantial blog post with the CTP release of <a href="http://www.powerpivotblog.nl/new-sql-release-sql-server-2008-r2-ctp">Project Gemini</a> now known as PowerPivot, PowerPivot really changed my enthusiasm to a whole new level. From this post on I started doing more substantial blog posts to share about my experiences on Gemini, this also was my way into the product team (Through Rob Collie and his blog <a href="http://PowerPivotPro.com">PowerPivotPro.com</a>) that helped me when I got stuck on Gemini. After a while blogging and twitter got me into the online community and I started doing presentations on SQLSaturday and other events. And eventually it led me across the pond to the us to work for ms.</p>
<p><strong>Why do I currently blog?</strong></p>
<p>Since I started to work for Microsoft my blogging situation changed quiet a bit, but I still love blogging. Why do I keep on blogging?</p>
<ul>
<li>Since i now have the latest information, i can share it the moment the product gets out</li>
<li>I really like my ask a questions page, it gives me a good idea what you all are doing with powepivot and it gives me ideas on what to blog about.</li>
<li>It allows me to test out the product with some real world scenarios</li>
<li>Gives me ideas for presentations</li>
<li>It keeps me connected to the twitter and blogging community. I really like the community but sometimes it&#8217;s really hard to stay connected to the world outside Microsoft.</li>
</ul>
<img src="http://www.powerpivotblog.nl/?ak_action=api_record_view&id=2465&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/kjonge/~4/FUno4NyTwko" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.powerpivotblog.nl/why-do-i-blog/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerPivot: Calculate ratio to parent</title>
		<link>http://www.powerpivotblog.nl/powerpivot-calculate-ratio-to-parent</link>
		<comments>http://www.powerpivotblog.nl/powerpivot-calculate-ratio-to-parent#comments</comments>
		<pubDate>Wed, 04 Jan 2012 03:16:03 +0000</pubDate>
		<dc:creator>Kasper de Jonge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.powerpivotblog.nl/?p=2455</guid>
		<description><![CDATA[With SQL 2012 PowerPivot we have hierarchies at our disposal, one of the most common calculations we want to do with those hierarchies is doing a ratio to parent. This blog describes how you to do that. I started with two simple tables, one a team / chapter table, the other sales by chapter: Now [...]]]></description>
			<content:encoded><![CDATA[<p>With SQL 2012 PowerPivot we have hierarchies at our disposal, one of the most common calculations we want to do with those hierarchies is doing a ratio to parent. This blog describes how you to do that.</p>
<p>I started with two simple tables, one a team / chapter table, the other sales by chapter:</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/tables.png"><img class="alignnone size-full wp-image-2456" title="tables" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/tables.png" alt="" width="402" height="199" /></a></p>
<p>Now I loaded these into PowerPivot, created a reletionship and a hierarchy:</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/diagram.png"><img class="alignnone  wp-image-2457" title="diagram" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/diagram.png" alt="" width="433" height="184" /></a></p>
<p>Next I use the Hierarchy in a pivottable together with a Sum of SalesAmount measure:</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/hierarchy.png"><img class="alignnone size-full wp-image-2458" title="hierarchy" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/hierarchy.png" alt="" width="204" height="187" /></a></p>
<p>Now we need a new measure that allows us to compare the actual sales per chapter with the sales of the team (or of all the chapters of the same team). This is a pretty  straightforward DAX formula once you understand my second phrase &#8220; all the chapters of the same team&#8221;. What we in DAX can do is overwrite filtercontext and that is what we can do here.</p>
<p>If you take the same pivottable again but now we look at the highlighted cell:</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/filters.png"><img class="alignnone size-full wp-image-2459" title="filters" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/filters.png" alt="" width="192" height="177" /></a></p>
<p>What filters are used to calculate the sum of sales?  The filters here are &#8220;Hierarchy1 = Team&#8221; and &#8220;Hierarchy2=chapter1&#8243;. Now using calculate we can overwrite filters, so all we need to make sure of is that in our new measure we never listen to the Hierarchy2 filter, or in the DAX case we always filter Hierarchy2 by ALL values in the column. The reason that we can use ALL values in the Hierarchy2 column is that the other filter is still in place, Hierarchy1 is still filtered by &#8220;Team&#8221; so it will only return values for chapters that belong to the &#8220;Team&#8221;</p>
<p>This gives us the following DAX statement:</p>
<p>=CALCULATE([Sum of Sales],ALL(Table1[Hierarchy2]))</p>
<p>Gives us the following pivottable:</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/ptable2.png"><img class="alignnone size-full wp-image-2460" title="ptable2" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/ptable2.png" alt="" width="347" height="168" /></a></p>
<p>Now it is pretty simple to add a ratio formula:</p>
<p>=[Sum of Sales] / [Sum of sales all chapters]</p>
<p>That gives us the result we want:</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/ratio.png"><img class="alignnone size-full wp-image-2461" title="ratio" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/ratio.png" alt="" width="454" height="169" /></a></p>
<p>So that turned out to be pretty easy once you understand the concept.</p>
<p>But what if you have multiple levels ? This needs a little more extended &#8220;Sum of Parent&#8221; formula since we need to override all level individually:</p>
<pre>=if(HASONEVALUE(Table1[Hierarchy2]),
                    CALCULATE([Sum of Sales],all(Table1[Hierarchy2])) ,
                    CALCULATE([Sum of Sales],all(Table1[Hierarchy12]))
     )</pre>
<p>Here we check if we are actually at the lowest level of the hierarchy &#8220;Table1[Hierarchy2]&#8221; if that is the case we override the filtercontext with that level. Otherwhise we override with the level above. This can be repeated if you have more levels:</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/multi.png"><img class="alignnone size-full wp-image-2462" title="multi" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/multi.png" alt="" width="409" height="326" /></a></p>
<p>&nbsp;</p>
<img src="http://www.powerpivotblog.nl/?ak_action=api_record_view&id=2455&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/kjonge/~4/FmET7Z6xVfU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.powerpivotblog.nl/powerpivot-calculate-ratio-to-parent/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

