<?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>Fri, 27 Jan 2012 04:58:58 +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>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>
		<item>
		<title>PowerPivot and Excel: Using a dynamic label in a chart</title>
		<link>http://www.powerpivotblog.nl/powerpivot-using-a-dynamic-label-in-a-chart</link>
		<comments>http://www.powerpivotblog.nl/powerpivot-using-a-dynamic-label-in-a-chart#comments</comments>
		<pubDate>Fri, 30 Dec 2011 04:38:04 +0000</pubDate>
		<dc:creator>Kasper de Jonge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.powerpivotblog.nl/?p=2440</guid>
		<description><![CDATA[I got this interesting question on my ask a questions page that I would like to answer by writing a blog post. The question was the following: I have a table fetched from a SQL database that contains a few fields but the interested ones are ComputerID and SystemStartupTime which is the time a computer [...]]]></description>
			<content:encoded><![CDATA[<p>I got this interesting question on my <a href="http://www.powerpivotblog.nl/ask-you-questions-here#comment-2516">ask a questions page</a> that I would like to answer by writing a blog post.</p>
<p>The question was the following:</p>
<blockquote><p>I have a table fetched from a SQL database that contains a few fields but the interested ones are ComputerID and SystemStartupTime which is the time a computer takes to boot.<br />
I have been asked to display this information on a graph averaged by the average of each ComputerID which I did like this:<br />
myWonderfulMeasure:=ROUND(AVERAGEX(SUMMARIZE(myTable,myTable[ComputerID],”AveragePerComputer”,AVERAGE([SystemStartupTime])),[AveragePerComputer]), 0)<br />
The graph using this measure shows those values by Year and WeekNumber successfully using slicers to play with different variables.</p>
<p>Now I have to display this average on another graph by segments of 30 seconds. This means, by number of machines that booted in:<br />
- 0 to 30 seconds<br />
- 31 to 60 seconds<br />
- …</p>
<p>I wanted to use an autocalculated column. However I lose the average per computer (as the table lists all of the boot times).<br />
I then tried to create a new measure with a long and dirty IF:<br />
=if(Table[myWonderfulMeasure]&lt;=30, &#8220;0-30&#8243;, if(Table[myWonderfulMeasure]&lt;=60, &#8220;30-60&#8243;, [..] ))<br />
However it doesn&#8217;t work at all. I can only use this measure as value (which displays nothing on the graph except 0, 0.1, .., 0.9, 1 on the y axe, and no bar) I can&#8217;t put the measure on the Legend Field for instance.</p></blockquote>
<p>Unfortunately it is not possible to use a measure and put it on a label in Excel (but it is possible in Power View for non text meaures). So we need another solution. We can solve this in the exact opposite way. Lets look at an example using adventureworks with the FactInternetSales and DimProduct (filtered to only contain the current items) table:</p>
<p>I want to see the number of products per color per salesgroup where salesgroup is defined in Large, Medium and Small. The first idea that comes to mind is to create a measure that does what we want. That is pretty straightforward but unfortunately doesn&#8217;t work in Excel. So we need to come up with another solution.</p>
<p>What I did is define a table in Excel that defines the SalesGroup with Labels and min and max values:</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/labels.png"><img class="alignnone size-full wp-image-2442" title="labels" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/labels.png" alt="" width="302" height="96" /></a></p>
<p>Now I load this into PowerPivot as a linked table (no relationships created) and start by creating a pivottable using Color and the Label</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/table1.png"><img class="alignnone size-full wp-image-2443" title="table" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/table1.png" alt="" width="460" height="292" /></a></p>
<p>Now I can create a measure that determines the number of products that fall between the min and max for each SalesGroup:</p>
<pre>=if(HASONEVALUE(Categorygroup[Label]),
		COUNTROWS(
			FILTER(DimProduct,
				[Sum of SalesAmount] &gt;= VALUES(Categorygroup[Low])
				&amp;&amp; [Sum of SalesAmount] &lt; VALUES(Categorygroup[High])
				)
			)
	, COUNTROWS(DimProduct))</pre>
<p>This gives us the result we wanted:</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/values1.png"><img class="alignnone size-full wp-image-2444" title="values" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/values1.png" alt="" width="415" height="251" /></a></p>
<p>or create a chart from it:</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/chart.png"><img class="alignnone size-full wp-image-2445" title="chart" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/chart.png" alt="" width="542" height="314" /></a></p>
<p>Lets look at this measure step by step:</p>
<ol>
<li><em>if(HASONEVALUE(categorygroup [Label]), &#8230; , COUNTROWS(DimProduct))</em>: Do we have a single categorygroup selected in the pivottable ? If yes we can select a range, if more are selected return COUNTROWS(DimProduct)</li>
<li><em>COUNTROWS(</em>: Count the number of rows</li>
<li><em>FILTER(DimProduct,</em>  : From a filtered DimProducttable (observe that the filter created by putting colors on rows in effect as well)</li>
<li><em>[Sum of SalesAmount] &gt;= values(categorygroup [Low])</em><br />
<em> &amp;&amp; [Sum of SalesAmount] &lt; VALUES(categorygroup [High]))</em> : Filter all rows in the DimProduct table where a measure [Sum of SalesAmount] is greater or equal then the value of categorygroup [Low] for the current categorygroup (using VALUES) and [Sum of SalesAmount] smaller then the value of categorygroup [High]</li>
</ol>
<p>Hope this showed a simple approach to create a solution for Excel that gives you dynamic labels.</p>
<img src="http://www.powerpivotblog.nl/?ak_action=api_record_view&id=2440&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/kjonge/~4/rsJdQPILFys" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.powerpivotblog.nl/powerpivot-using-a-dynamic-label-in-a-chart/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Tutorial: Optimize a Sample PowerPivot Model for Power View Reports</title>
		<link>http://www.powerpivotblog.nl/tutorial-optimize-a-sample-powerpivot-model-for-power-view-reports</link>
		<comments>http://www.powerpivotblog.nl/tutorial-optimize-a-sample-powerpivot-model-for-power-view-reports#comments</comments>
		<pubDate>Wed, 14 Dec 2011 23:31:14 +0000</pubDate>
		<dc:creator>Kasper de Jonge</dc:creator>
				<category><![CDATA[Power View]]></category>
		<category><![CDATA[PowerPivot]]></category>
		<category><![CDATA[Power view]]></category>

		<guid isPermaLink="false">http://www.powerpivotblog.nl/?p=2437</guid>
		<description><![CDATA[Our documentation team released a great tutorial that explains all the ins and outs on what you need to do when you want to optimize your tabular model for Power View The entire tutorial can be found here: http://social.technet.microsoft.com/wiki/contents/articles/6176.aspx &#160;]]></description>
			<content:encoded><![CDATA[<p>Our documentation team released a great tutorial that explains all the ins and outs on what you need to do when you want to optimize your tabular model for Power View</p>
<p><img class="alignnone" src="http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/6242.rs_5F00_CresTutPPvtAllUp.jpg" alt="" width="550" height="415" /></p>
<p>The entire tutorial can be found here: <a href="http://social.technet.microsoft.com/wiki/contents/articles/6176.aspx">http://social.technet.microsoft.com/wiki/contents/articles/6176.aspx</a></p>
<p>&nbsp;</p>
<img src="http://www.powerpivotblog.nl/?ak_action=api_record_view&id=2437&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/kjonge/~4/fZW6z3BDIxQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.powerpivotblog.nl/tutorial-optimize-a-sample-powerpivot-model-for-power-view-reports/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to unpivot using Excel and load it into PowerPivot</title>
		<link>http://www.powerpivotblog.nl/how-to-unpivot-using-excel-and-load-it-into-powerpivot</link>
		<comments>http://www.powerpivotblog.nl/how-to-unpivot-using-excel-and-load-it-into-powerpivot#comments</comments>
		<pubDate>Fri, 09 Dec 2011 01:11:55 +0000</pubDate>
		<dc:creator>Kasper de Jonge</dc:creator>
				<category><![CDATA[Excel]]></category>
		<category><![CDATA[PowerPivot]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.powerpivotblog.nl/?p=2419</guid>
		<description><![CDATA[I had an interesting question today where someone send me a workbook that contained a flattened table like this: Now as a result we want to see the top 1 nr of products per country. The problem here is that we cannot just load this data into PowerPivot and start analyzing to get this result. In [...]]]></description>
			<content:encoded><![CDATA[<p>I had an interesting question today where someone send me a workbook that contained a flattened table like this:</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/flattable1.png"><img class="alignnone size-full wp-image-2421" title="flattable" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/flattable1.png" alt="" width="505" height="276" /></a></p>
<p>Now as a result we want to see the top 1 nr of products per country. The problem here is that we cannot just load this data into PowerPivot and start analyzing to get this result. In this case the columns need to become attributes in a dimension. This is a classical ETL operation that can be done by many tools like <a href="http://technet.microsoft.com/en-us/library/ms177410.aspx">SQL</a> and <a href="http://www.bing.com/url?source=search&amp;rch=ocoQ2zC5UgcITTGD9FT9rholsNk1mQg&amp;url=http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fms141723.aspx&amp;urltarget=_top&amp;q=ssis%20unpivot&amp;qs=n&amp;sk=&amp;sc=5-9&amp;form=QBRE&amp;prevver=search&amp;ssIG=4b42d392aad84c7c8bf1674b58489f6f">SSIS </a>, but not by PowerPivot as a modeling tool.</p>
<p>So how do you fix this problem ? At first I used a Macro that we found <a href="http://stackoverflow.com/questions/687470/how-to-flatten-or-collapse-a-2d-excel-table-into-1d">online </a>to unpivot the data, that did get me the result I wanted. But some time later I realized that there is a trick in Excel that I can use that I have blogged about before <a href="http://www.powerpivotblog.nl/convert-a-excel-pivot-table-to-a-excel-table-use-ssas-data-to-do-data-mining-in-excel">here</a>, by combining this trick and another it will be pretty easy to unpivot.</p>
<p>In this blog post I will show you how to Unpivot a flattened table using PowePivot and Excel (Actually you would not even need PowerPivot if you don&#8217;t want to).</p>
<p>The first thing we do is create a regular excel pivottable out of the table I showed in the first image</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/pivottable0.png"><img class="alignnone size-full wp-image-2426" title="pivottable0" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/pivottable0.png" alt="" width="651" height="347" /></a></p>
<p>Next we change &#8220;Count of Product x&#8221; to &#8220;Sum of Product  x&#8221; and change the pivottable into a classic pivottable using Pivottable options:</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/options.png"><img class="alignnone size-full wp-image-2427" title="options" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/options.png" alt="" width="436" height="469" /></a></p>
<p>This will turn it into a column per level:</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/pivottable.png"><img title="pivottable" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/pivottable.png" alt="" width="730" height="374" /></a></p>
<p>Next we move the values from Colum to Rows, this results in an unpivoted result.</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/unpivot.png"><img class="alignnone size-full wp-image-2428" title="unpivot" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/unpivot.png" alt="" width="653" height="479" /></a></p>
<p>Next we need to turn the measure &#8220;Sum of Product X&#8221; into a column. Copy the entire pivottable and past it in a new sheet keeping only the values</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/values.png"><img class="alignnone size-full wp-image-2429" title="values" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/values.png" alt="" width="412" height="201" /></a></p>
<p>This will result in a flat table inside Excel. Now I select the &#8220;Sum of Product X&#8221; table and use search and replace to replace &#8220;Sum of &#8221; with a empty space. I also renamed the product column header:</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/table.png"><img class="alignnone size-full wp-image-2430" title="table" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/table.png" alt="" width="333" height="288" /></a></p>
<p>Now the last thing that I need to do is get rid of the blanks and replace them with the same values as the previous row. Here I can use another Excel trick:</p>
<p>Start by selecting all the columns we want to fill the blanks of, go to the home tab and select “find and select”, and click “Go To special”. Here we can select<br />
blanks and click ok. This will result in all the blanks being selected.  Type =, press the up arrow and press Ctrl+Enter (that’s hold down Ctrl and press the Enter key). All the<br />
empty cells will be filled with the value of one row above. Exactly what we  wanted.</p>
<p>Now we can choose two options, load the table into PowerPivot or just use the regular Excel pivottable. I prefer getting my data into PowerPivot so let&#8217;s do that. Select a cell inside the table and go to the PowerPivot ribbon and click Create linked table. This will automaticly create a Excel table (make sure to select my table has headers) and load the data into PowerPivot:</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/tablepp.png"><img class="alignnone size-full wp-image-2431" title="tablepp" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/tablepp.png" alt="" width="388" height="392" /></a></p>
<p>Now we can create a new pivottable based on this table:</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/ppresult.png"><img class="alignnone size-full wp-image-2432" title="ppresult" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/ppresult.png" alt="" width="577" height="428" /></a></p>
<p>As final step we need to determine the Top 1 product per country, again we are going to use an Excel function. Select a product in the pivottable and click on the filter button on row labels. Now we select value filters, click Top 10 and change the number of items from 10 to 1 and press Ok.</p>
<p>This will give us the result we want:</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/result.png"><img class="alignnone size-full wp-image-2433" title="result" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/12/result.png" alt="" width="236" height="264" /></a></p>
<p>As you can a lot can be done with Excel, you just have to know your way around. While this might not be a surprise for most of the Excel pro&#8217;s out there, we BI Pro&#8217;s are eager to run things through SQL or SSIS but it can just as easily be done by Excel. <a href="http://www.powerpivotpro.com/2011/12/friday-bonus-excel-goes-gangsta/">Maybe now I will be Excel gansta enough to join Rob Collie&#8217;s elite Excel group <img src='http://www.powerpivotblog.nl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<img src="http://www.powerpivotblog.nl/?ak_action=api_record_view&id=2419&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/kjonge/~4/Hwnwd18J8JU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.powerpivotblog.nl/how-to-unpivot-using-excel-and-load-it-into-powerpivot/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The future of information workers according to Microsoft, and BI plays a big part</title>
		<link>http://www.powerpivotblog.nl/the-future-of-information-workers-according-to-microsoft-and-bi-plays-a-big-part</link>
		<comments>http://www.powerpivotblog.nl/the-future-of-information-workers-according-to-microsoft-and-bi-plays-a-big-part#comments</comments>
		<pubDate>Fri, 28 Oct 2011 03:19:34 +0000</pubDate>
		<dc:creator>Kasper de Jonge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.powerpivotblog.nl/?p=2398</guid>
		<description><![CDATA[I just couldn&#8217;t resist sharing this (from GeekWire) This might be as close as we’re going to get to a time machine. Unless they’re working on that, too. Microsoft this morning is premiering a new video that shows how the company believes technology is poised to evolve over the next five to 10 years, based on the [...]]]></description>
			<content:encoded><![CDATA[<p>I just couldn&#8217;t resist sharing this (from <a href="http://www.geekwire.com/2011/microsofts-video-proves-future-awesome">GeekWire</a>)</p>
<blockquote><p>This might be as close as we’re going to get to a time machine. Unless they’re working on that, too.</p>
<p>Microsoft this morning is <a href="http://blogs.technet.com/b/microsoft_blog/archive/2011/10/27/microsoft-offers-a-glimpse-into-the-future-of-productivity.aspx">premiering a new video</a> that shows how the company believes technology is poised to evolve over the next five to 10 years, based on the trends its researchers and engineers are seeing in software, devices, displays, sensors, processors and intelligent systems</p></blockquote>
<p>just watch it and tell me if you see the same things I did:</p>
<span style="text-align:center; display: block;"><a href="http://www.powerpivotblog.nl/the-future-of-information-workers-according-to-microsoft-and-bi-plays-a-big-part"><img src="http://img.youtube.com/vi/a6cNdhOKwi0/2.jpg" alt="" /></a></span>
<p>Yes it is the future according to Microsoft (as a whole not just the AS team <img src='http://www.powerpivotblog.nl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) and as you can see it contains a lot of BI in all shapes and forms. BI will be really immersive in every decision we make. And of course someone has to build the models and tools <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=2398&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/kjonge/~4/jYVLlIezE0o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.powerpivotblog.nl/the-future-of-information-workers-according-to-microsoft-and-bi-plays-a-big-part/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Power View, Tabular mode databases, SharePoint and Kerberos</title>
		<link>http://www.powerpivotblog.nl/power-view-tabular-mode-databases-sharepoint-and-kerberos</link>
		<comments>http://www.powerpivotblog.nl/power-view-tabular-mode-databases-sharepoint-and-kerberos#comments</comments>
		<pubDate>Tue, 25 Oct 2011 02:23:01 +0000</pubDate>
		<dc:creator>Kasper de Jonge</dc:creator>
				<category><![CDATA[Analysis services]]></category>
		<category><![CDATA[Power View]]></category>
		<category><![CDATA[Kerberos]]></category>
		<category><![CDATA[Power view]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Tabular]]></category>

		<guid isPermaLink="false">http://www.powerpivotblog.nl/?p=2374</guid>
		<description><![CDATA[yes, the word that any BI or IT pro dreads: Kerberos .. Imagine you want to run Power View in a SharePoint farm on top of a SSAS database running in Tabular mode. You probably want to use security so you can secure the data by the user that is actually running the report using [...]]]></description>
			<content:encoded><![CDATA[<p>yes, the word that any BI or IT pro dreads: <a href="http://en.wikipedia.org/wiki/Kerberos_(protocol)">Kerberos </a>.. Imagine you want to run Power View in a SharePoint farm on top of a SSAS database running in Tabular mode. You probably want to use security so you can secure the data by the user that is actually running the report using the AS security features.</p>
<p>But most likely you won&#8217;t run your AS instance on a machine that is inside of the SharePoint farm. When all of your machines are inside the same SharePoint farm, SharePoint will take care of passing the credentials between the machines. But as soon as one of the machines lives outside of the farm you have to setup Kerberos to make sure the security is correctly passed on between machines. Configuring Kerberos is a lot of (hard) work if Kerberos is not already set up correctly in your organisation.</p>
<p>But there is some good news on this with SQL server 2012. In SQL Server 2012 we introduce the <a href="http://msdn.microsoft.com/en-us/library/hh230972(v=sql.110).aspx">BISM file</a> that allows us to start a Power View report based on the connection information in this BISM file. Whenever a connection is made from Power View to the Tabular database it tries to connect using the credentials of the user that is executing the Power View report. If Kerberos is not configured this connection will fail regardless of him having access.</p>
<p>But there is a fall back scenario, when using the BISM connection to connect to a tabular database ADOMD will give it another try using the execution account the Reporting Services app server is running under and then switch to the actual user who initiated the connection. All you have to do is add the execution account the Reporting Services app server is running under to the administrators of the AS instance and this connection will succeed even without Kerberos is set up. Admin connections are always allowed cross machines, under the covers ADODM uses the effectiveusername connection string parameter to switch to the actual user initiating the connection after connection is being made.</p>
<p>This post is dedicated to <a href="http://www.marcvalk.net/">Marc Valk</a> my esteemed former colleague with whom we battle the Kerberos beast several times at my previous job <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=2374&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/kjonge/~4/aqhYrfYXI4g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.powerpivotblog.nl/power-view-tabular-mode-databases-sharepoint-and-kerberos/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Deploy only changes to a Tabular model from BIDS and not process</title>
		<link>http://www.powerpivotblog.nl/deploy-only-changes-to-a-tabular-model-from-bids-and-not-process</link>
		<comments>http://www.powerpivotblog.nl/deploy-only-changes-to-a-tabular-model-from-bids-and-not-process#comments</comments>
		<pubDate>Sat, 22 Oct 2011 03:18:23 +0000</pubDate>
		<dc:creator>Kasper de Jonge</dc:creator>
				<category><![CDATA[Analysis services]]></category>
		<category><![CDATA[BIDS]]></category>
		<category><![CDATA[PowerPivot]]></category>
		<category><![CDATA[Tabular model]]></category>

		<guid isPermaLink="false">http://www.powerpivotblog.nl/?p=2381</guid>
		<description><![CDATA[One of the question that regularly comes up is: &#8220;He I have created a tabular model in BIDS and deployed it to my test server, now I have changed a measure or a calculated column I deploy those changes and all of my tables are again loaded. I don&#8217;t want that ! I just want [...]]]></description>
			<content:encoded><![CDATA[<p>One of the question that regularly comes up is: &#8220;He I have created a tabular model in BIDS and deployed it to my test server, now I have changed a measure or a calculated column I deploy those changes and all of my tables are again loaded. I don&#8217;t want that ! I just want to deploy some metadata&#8221;.</p>
<p>Well actually that is exactly what we do, but the UI is a little deceiving.</p>
<p>When you deploy for the first time and <strong>any</strong> time after you get the same UI:</p>
<p><a href="http://www.powerpivotblog.nl/wp-content/uploads/2011/10/deploy.png"><img class="alignnone size-full wp-image-2391" title="deploy" src="http://www.powerpivotblog.nl/wp-content/uploads/2011/10/deploy.png" alt="" width="467" height="490" /></a></p>
<p>But under the covers what we do is:</p>
<ul>
<li>Update the metadata of the database on the server</li>
<li>Send a Process Default command to the database</li>
</ul>
<div>What happens on the second step at Process Default is that the engine is smart enough to discover what needs to be done to get the database in a fully processed state. If the table already contains data it will not update the database (it will <strong>NOT</strong> check if there is new data) otherwise it will process the table. At the end of the Process Default command the engine will send a Process Recalc to the database, this will make sure that all the calculated columns / relationships are made into a good state as well.</div>
<div>So in short, if you deploy your model for a second time it won&#8217;t reprocess the tables if you haven&#8217;t made any structural changed to the model like adding columns. Even though it looks like that in the refresh UI.</div>
<div>Hope this helps.</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<img src="http://www.powerpivotblog.nl/?ak_action=api_record_view&id=2381&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/kjonge/~4/uQLBLmWdO1A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.powerpivotblog.nl/deploy-only-changes-to-a-tabular-model-from-bids-and-not-process/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

