<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DkYMRH84eCp7ImA9WhBbF0g.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184</id><updated>2013-05-16T21:29:45.130-04:00</updated><category term="Personal" /><category term="Book / Tool / Software Reviews" /><category term="Denali" /><category term="Data Explorer" /><category term="Syndicated" /><category term="Spatial / Map Reports" /><category term="DAX" /><category term="Power View" /><category term="Activities / Whitepapers / Events" /><category term="SSAS" /><category term="My Sessions" /><category term="SSRS" /><category term="SQL Server" /><category term="DAXMD" /><category term="PowerPivot" /><category term="Interview Questions" /><category term="Office 2013" /><category term="MDX" /><title>Some Random Thoughts</title><subtitle type="html">Blog on SQL Server, SSAS, SSRS, DAX, MDX and anything related to Microsoft Business Intelligence</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.sqljason.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://www.sqljason.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Jason Thomas</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>119</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/Jason" /><feedburner:info uri="blogspot/jason" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><link rel="license" type="text/html" href="http://creativecommons.org/licenses/by-sa/3.0/" /><feedburner:emailServiceId>blogspot/Jason</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;AkMDRHs8fSp7ImA9WhBbFko.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-7085480251754042658</id><published>2013-05-16T00:27:00.001-04:00</published><updated>2013-05-16T00:27:55.575-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-05-16T00:27:55.575-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Activities / Whitepapers / Events" /><category scheme="http://www.blogger.com/atom/ns#" term="Personal" /><title>Ehh, What’s up, SqlJason?</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;It’s been more than a month since the last post and you might be wondering – what’s up with SqlJason? Well, let me tell you that the last one month has been really busy and I thought of filling you guys in with some of the juicy stuff that’s been happening!&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-DhXtR5yEiqw/UZRgLhrl-aI/AAAAAAAAFrs/x3fVd4Mhe0Y/s1600-h/image%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="Ehh, What&amp;rsquo;s up, SqlJason?" border="0" alt="Ehh, What&amp;rsquo;s up, SqlJason?" src="http://lh4.ggpht.com/-lcLiXbfRohM/UZRgME3bfWI/AAAAAAAAFr0/UvS-xZCDfyY/image_thumb%25255B1%25255D.png?imgmax=800" width="311" height="191"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;&lt;u&gt;1) Speaking Events&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;Last year April was when I started my first speaking assignment in the USA and it was great to have &lt;a title="2012 in a Nutshell" href="http://www.sqljason.com/2013/01/2012-in-nutshell.html" target="_blank"&gt;so many different opportunities to present last year&lt;/a&gt;. This year April also turned out to be the starting month for my presentations, and I can’t believe that I already presented at five different places this month.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-8cmxJZgL7C4/UZRgMurI0mI/AAAAAAAAFr8/ZcaNYTtbW8U/s1600-h/image%25255B8%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Speaking events in April" border="0" alt="Speaking events in April" src="http://lh5.ggpht.com/-wJJ95L_becU/UZRgNGu8gmI/AAAAAAAAFsA/yZxCGYItNMo/image_thumb%25255B4%25255D.png?imgmax=800" width="600" height="70"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;The &lt;strong&gt;&lt;font color="#0000ff"&gt;PASS BA Conference&lt;/font&gt;&lt;/strong&gt; was the first stop, and this was my first experiencing presenting in a big stage. Looks like it went good from the session evaluations (got a 4.6, my session ranks in the top 15 out of the 60+ sessions in the conference)&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-K5xQtsqX8yg/UZRgNlqWiYI/AAAAAAAAFsM/XuQdk_7rZBw/s1600-h/image%25255B12%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Session Evals sorted by sessions ratings" border="0" alt="Session Evals sorted by session ratings" src="http://lh6.ggpht.com/-d4CxBc7QzKU/UZRgObgIOyI/AAAAAAAAFsU/4DT0i-qGprc/image_thumb%25255B6%25255D.png?imgmax=800" width="504" height="308"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;The attendance was also pretty decent, managed to pull in 98 people which is the highest I have ever got in any of my sessions.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-Xce2Tbf4-QI/UZRgO19vzpI/AAAAAAAAFsc/m-3lheRSrvU/s1600-h/image%25255B16%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Session Evals sorted by attendance" border="0" alt="Session Evals sorted by attendance" src="http://lh5.ggpht.com/-0VDdlYeXHPo/UZRgPk4q5cI/AAAAAAAAFsk/LyWsmHx4UhY/image_thumb%25255B8%25255D.png?imgmax=800" width="504" height="359"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;I had lots of fun with my #sql&lt;/font&gt;&lt;font color="#000000" size="2"&gt;family and also got to meet a lot of new people. Overall, a very fun experience and I am definitely going to attend PASS BA Conference next year. Next stop was &lt;strong&gt;&lt;font color="#0000ff"&gt;SQL Saturday Chicago&lt;/font&gt; &lt;/strong&gt;and this was just the next day after PASS BA Con. After all the partying and the awesome speaker dinner at the previous night, speaking was always going to be difficult task but luckily, everything including the demos went fine. I also got to see some great sessions by &lt;a title="Mark's blog" href="http://markvsql.com/" target="_blank"&gt;Mark V&lt;/a&gt; &amp;amp; &lt;a title="Doug's blog" href="http://www.douglane.net/" target="_blank"&gt;Doug Lane&lt;/a&gt;, &lt;a title="Julie's blog" href="http://www.mssqlgirl.com/" target="_blank"&gt;Julie Koesmarno&lt;/a&gt;, &lt;a title="Leonard's blog" href="http://www.leonardmurphy.com/" target="_blank"&gt;Leonard Murphy&lt;/a&gt;. In short, another great experience and a very well organized event. Next on the list was &lt;font color="#0000ff"&gt;&lt;strong&gt;SQL Saturday Jacksonville &lt;/strong&gt;&lt;/font&gt;&lt;font color="#000000"&gt;which took place 2 weeks after the Chicago event&lt;/font&gt;. The Jacksonville event was one of my favourites from last year and it turned out to be even better this year as it was the first time all four of us &lt;a title="Charlotte BI Group" href="http://charbigroup.com/" target="_blank"&gt;&lt;strong&gt;CBIG&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;buddies (me, &lt;a title="Javier Guillen's blog" href="http://javierguillen.wordpress.com/" target="_blank"&gt;Javier&lt;/a&gt;, &lt;a title="Melissa's blog" href="http://sqlchick.com" target="_blank"&gt;Melissa&lt;/a&gt; and &lt;a title="Rafael's blog" href="http://www.rafael-salas.com/" target="_blank"&gt;Rafael&lt;/a&gt;) got selected to speak at the same event. And I must say Jacksonville didn’t disappoint me, great crowd as usual and highly interactive (and very generous with the session evals too hehe). A couple of days later, I started off for my first user group speaking event of the year – &lt;strong&gt;&lt;font color="#0000ff"&gt;Triad SQL BI User Group &lt;/font&gt;&lt;/strong&gt;at Winston Salem. A big thanks to the user group leaders (&lt;a title="Katherine's twitter account" href="https://twitter.com/sqlsassy" target="_blank"&gt;Katherine Fraser&lt;/a&gt; and &lt;a title="Doug's blog" href="http://sqlnikon.wordpress.com/" target="_blank"&gt;Doug Purnell&lt;/a&gt;) for giving me the opportunity, really enjoyed interacting with the user group members there. The next speaking event was the &lt;strong&gt;&lt;font color="#0000ff"&gt;Carolina Code Camp 2013&lt;/font&gt;&lt;/strong&gt; which was in Charlotte itself (finally a home event! &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-openmouthedsmile" alt="Open-mouthed smile" src="http://lh4.ggpht.com/-xyoqVzeB_eg/UZRgP6w4hnI/AAAAAAAAFso/IpkjA4nXTEo/wlEmoticon-openmouthedsmile%25255B2%25255D.png?imgmax=800"&gt;). Unlike the other four events, the majority of the attendees was from a non-SQL Server background. So it was fun speaking to a different profile of attendees and I must say that this was one of those sessions where the attendees laughed at all of my jokes (either they got all of my jokes or were being REALLY nice with me &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://lh5.ggpht.com/-CrCEdQhJqMs/UZRgQJTE8GI/AAAAAAAAFs0/At6iMXVMvXo/wlEmoticon-smile%25255B2%25255D.png?imgmax=800"&gt;).&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;I remember someone saying that event speaking is really addictive, I couldn’t agree more! Just to prove that, I have 2 more events coming up in the next week:-&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;a) &lt;font style="background-color: #ffff00" color="#0000ff"&gt;&lt;strong&gt;&lt;a title="SQL Saturday Atlanta" href="http://sqlsaturday.com/220/schedule.aspx" target="_blank"&gt;SQL Saturday Atlanta&lt;/a&gt;&lt;/strong&gt;&lt;/font&gt; – I will be speaking on the topic “GeoSpatial Analytics using Microsoft BI” at 1 pm, this weekend. This is going to be another really great event with registrations hitting record levels for a SQL Saturday (800+ including waiting list). If you are coming for the event, definitely drop by and introduce yourself, I would love to meet you. &lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;b) &lt;font style="background-color: #ffff00" color="#0000ff"&gt;&lt;strong&gt;&lt;a title="Mariner Webinar" href="https://clicktoattend.microsoft.com/en-us/Pages/EventDetails.aspx?EventID=169902&amp;amp;cm_mid=2441702&amp;amp;cm_crmid={d264c798-d5ad-de11-8e53-001e0b461470}" target="_blank"&gt;Mariner Webinar&lt;/a&gt;&lt;/strong&gt;&lt;/font&gt; – If you are not able to attend my session at SQL Saturday Atlanta, don’t worry. I am doing the same session (“GeoSpatial Analytics using Microsoft BI”) as a Webinar for my &lt;a title="Mariner's site" href="http://www.mariner-usa.com/" target="_blank"&gt;company - Mariner&lt;/a&gt; on &lt;u&gt;May 21, 2013&lt;/u&gt; 12:00 PM-01:00 PM Eastern. You can register for this &lt;strong&gt;&lt;u&gt;&lt;font color="#00ff00"&gt;FREE&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt; event by clicking on this link - &lt;a title="Mariner Webinar: GeoSpatial Analytics Using Microsoft BI Featuring Jason Thomas" href="https://clicktoattend.microsoft.com/en-us/Pages/EventDetails.aspx?EventID=169902&amp;amp;cm_mid=2441702&amp;amp;cm_crmid={d264c798-d5ad-de11-8e53-001e0b461470}" target="_blank"&gt;Click to Register&lt;/a&gt;&amp;nbsp; &lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;&lt;u&gt;2) CBIG Updates&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;As some of you recall, me and three others (&lt;a title="Javier Guillen's blog" href="http://javierguillen.wordpress.com/" target="_blank"&gt;Javier&lt;/a&gt;, &lt;a title="Melissa's blog" href="http://sqlchick.com" target="_blank"&gt;Melissa&lt;/a&gt; and &lt;a title="Rafael's blog" href="http://www.rafael-salas.com/" target="_blank"&gt;Rafael&lt;/a&gt;) started a new BI user group this year in Charlotte – &lt;a title="Charlotte BI Group" href="http://charbigroup.com/" target="_blank"&gt;CBIG&lt;/a&gt;. We are having a great run with attendees steadily increasing from 35 in the first meeting to 50+ in the last meeting (65 being the highest as of now). Even though five meetings are too early to call the user group a success, the popularity of CBIG is evident from the 87 registrations (including waiting list) we received in our fifth meeting (where our seating capacity is only 60). We had already moved from the initial meeting room after our second meeting (where our seating capacity was 30) and now, due to the increasing number of registrations, &lt;/font&gt;&lt;font color="#000000" size="2"&gt;we are moving our venue from New Horizons to the Microsoft Campus (which has a seating capacity of 85) in July. That said, the numbers are secondary. The primary aim for us is to cultivate a culture in CBIG which mainly revolves around the community spirit as well as a passion for technology. If you are in or around Charlotte, don’t miss out on our user group meetings on the first Tuesdays of every month. We have got meetings lined up till September as of now and the RSVP links can be found at &lt;a href="http://charbigroup.com/"&gt;http://charbigroup.com/&lt;/a&gt;. Also, don’t hesitate to contact me if you want to speak at our user group, we are always looking for speakers&lt;/font&gt;&lt;font color="#000000" size="2"&gt;!&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;&lt;u&gt;3) SQL Saturday Charlotte – BI Edition Announced&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;And yes, we have also announced the date for SQL Saturday Charlotte – BI Edition. The event will take place on Saturday, October 19, 2013 (which happens to be the Saturday after the PASS Summit 2013, which also is in Charlotte). The planning is going on full steam and we are confident that we will have a great event laid out for all of you guys. Ensure that you &lt;a title="SQL Saturday Charlotte Home Page" href="http://sqlsaturday.com/237/eventhome.aspx" target="_blank"&gt;register&lt;/a&gt; today to extend your PASS Summit 2013 experience.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a title="SQL Saturday Charlotte - BI Edition Home page" href="http://sqlsaturday.com/237/eventhome.aspx" target="_blank"&gt;&lt;img src="http://www.sqlsaturday.com/images/sqlsat237_web.png"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;&lt;u&gt;4) And now the BIG one - Personal Updates&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;For those of you who know me personally, this might be old news. And for the others, you might recall me saying at the start of the year that I might not match up to my previous year’s activities this year due to personal reasons. Well, the personal reason is given below.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-d0Zpmn69onU/UZRgRfRMMrI/AAAAAAAAFs8/lniYNnUPWsE/s1600-h/image%25255B20%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Me &amp;amp; my wife with the baby bump" border="0" alt="Me &amp;amp; my wife with the baby bump" src="http://lh4.ggpht.com/-NNUrZsqLoN8/UZRgSfFmfFI/AAAAAAAAFtE/nMC9AA29umY/image_thumb%25255B10%25255D.png?imgmax=800" width="304" height="403"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;Yups, I am going to be a father to a baby girl this August 12 and I have no shortage of adjectives to describe my condition right now – excited, anxious, nervous, hyperactive, charged and so on. I am looking forward to &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;those sleepless nights and all the other joys that come with parenthood. For the moment, I am going to stop writing and enjoy a good night’s sleep when I can.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=G2HMDs4Gtbo:bpFwgOMv-6g:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=G2HMDs4Gtbo:bpFwgOMv-6g:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=G2HMDs4Gtbo:bpFwgOMv-6g:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/G2HMDs4Gtbo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/7085480251754042658/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2013/05/ehh-whats-up-sqljason.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/7085480251754042658?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/7085480251754042658?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/G2HMDs4Gtbo/ehh-whats-up-sqljason.html" title="Ehh, What’s up, SqlJason?" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-lcLiXbfRohM/UZRgME3bfWI/AAAAAAAAFr0/UvS-xZCDfyY/s72-c/image_thumb%25255B1%25255D.png?imgmax=800" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://www.sqljason.com/2013/05/ehh-whats-up-sqljason.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A08DRXw9cCp7ImA9WhBWFkU.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-5995605865714056039</id><published>2013-04-11T10:17:00.001-04:00</published><updated>2013-04-11T10:17:54.268-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-11T10:17:54.268-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Office 2013" /><title>Download GeoFlow Preview for Excel 2013</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Over the last couple of weeks, many people have been asking me for the download links for GeoFlow. Well, I am pleased to say that GeoGlow has made it’s public preview today and is available for download now.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-ocmXptVk7jI/UWbGCxgTufI/AAAAAAAAFpg/UG469ElRamI/s1600-h/image%25255B2%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="GeoFlow Preview for Excel 2013" border="0" alt="GeoFlow Preview for Excel 2013" src="http://lh5.ggpht.com/-hQGXf03mbNQ/UWbGDYV1b5I/AAAAAAAAFpo/9d5J_JmDyC8/image_thumb.png?imgmax=800" width="504" height="159"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Find below some useful links (including the download link)&lt;/font&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;b&gt;&lt;a href="http://answers.microsoft.com/en-us/Search/Search?SearchTerm=geoflow&amp;amp;CurrentScope.ForumName=Office&amp;amp;CurrentScope.Filter=excel&amp;amp;askingquestion=False"&gt;&lt;font size="2"&gt;GeoFlow Forum&lt;/font&gt;&lt;/a&gt;&lt;/b&gt;&lt;font size="2"&gt;:Post and answer questions for the product team and community&lt;b&gt; &lt;/b&gt;&lt;/font&gt; &lt;li&gt;&lt;b&gt;&lt;a href="https://www.facebook.com/GeoFlowForExcel"&gt;&lt;font size="2"&gt;GeoFlow Facebook Page&lt;/font&gt;&lt;/a&gt;&lt;/b&gt;&lt;font size="2"&gt;: Share datasets, tours, and blogs&lt;/font&gt; &lt;li&gt;&lt;b&gt;&lt;a href="http://office.microsoft.com/en-us/download-geoflow-for-excel-FX104036784.aspx"&gt;&lt;font size="2"&gt;GeoFlow Product Page on Office.com&lt;/font&gt;&lt;/a&gt;&lt;/b&gt;&lt;font size="2"&gt;: Download requirements, directs to Web Download page below&lt;/font&gt; &lt;li&gt;&lt;b&gt;&lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=38395"&gt;&lt;font size="2"&gt;GeoFlow Download Page&lt;/font&gt;&lt;/a&gt;&lt;/b&gt;&lt;font size="2"&gt;: Download the bits on Microsoft Download Center&lt;b&gt; &lt;/b&gt;&lt;/font&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://blogs.office.com/b/microsoft-excel/archive/2013/04/11/dallas-utilities-electricity-seasonal-use-simulation-with-geoflow-preview-and-powerview.aspx" target="_blank"&gt;&lt;strong&gt;&lt;font size="2"&gt;Excel Blog&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt;&lt;font size="2"&gt;&lt;strong&gt; :&lt;/strong&gt; Dallas Utilities: Electricity seasonal use simulation using project codename “GeoFlow” Preview and Power View&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;And I guess it is time to cut down on some of the earlier limitations that &lt;a title="Introduction to Excel GeoFlow (Beta 1)" href="http://www.sqljason.com/2012/12/introduction-to-excel-geoflow-beta-1.html" target="_blank"&gt;I had mentioned about the beta release of GeoFlow&lt;/a&gt;:-&lt;br&gt;&lt;strike&gt;&lt;strong&gt;-&lt;/strong&gt; Related tables are not supported in this release.All the data should be in one table.&lt;br&gt;&lt;strong&gt;-&lt;/strong&gt; Backend data changes are not reflected in the visualization in this release and this will mean deleting and recreating the visualizations.&lt;br&gt;&lt;strong&gt;-&lt;/strong&gt; No Undo/Redo is supported in this release.&lt;/strike&gt;&lt;br&gt;&lt;strong&gt;-&lt;/strong&gt; No way to slice and dice data within the visualization&lt;br&gt;&lt;strong&gt;-&lt;/strong&gt; No drill down functionalities from a higher level (say, states) to a lower level (say, counties) which is there in tools like Power View.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;Not bad huh? Some new features are also there like the Top / Bottom 100 Chart shown below.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-AN38Rg1uee0/UWbGDp6z2WI/AAAAAAAAFpw/8-BzqBF1DQk/s1600-h/image%25255B5%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="top / bottom 100 chart in geoflow" border="0" alt="top / bottom 100 chart in geoflow" src="http://lh5.ggpht.com/-b90Fg7-jjjM/UWbGENrGngI/AAAAAAAAFp4/XCTeIDsc96c/image_thumb%25255B1%25255D.png?imgmax=800" width="486" height="265"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;It is interesting to note that GeoFlow is not available to all versions of Excel 2013. The supported &lt;/font&gt;&lt;font size="2"&gt;Microsoft Office versions are:&lt;/font&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;font size="2"&gt;Office Professional Plus 2013 &lt;/font&gt; &lt;li&gt;&lt;a href="http://office.microsoft.com/en-us/business/office-365-proplus-business-software-FX103213513.aspx"&gt;&lt;font size="2"&gt;Office 365 ProPlus&lt;/font&gt;&lt;/a&gt; &lt;li&gt;&lt;font size="2"&gt;Office 365 Midsize &lt;/font&gt; &lt;li&gt;&lt;font size="2"&gt;Office 365 E3 &lt;/font&gt; &lt;li&gt;&lt;font size="2"&gt;Office 365 E4&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;&lt;font size="2"&gt;Enough of me telling, it’s time to explore this add-in on your own now. Download GeoFlow today and take your data for a 3-D drive! &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://lh4.ggpht.com/-5mXuMrLO5D8/UWbGEXAkwxI/AAAAAAAAFqA/GWJyZlx43wY/wlEmoticon-smile%25255B2%25255D.png?imgmax=800"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=23D21sPUaQg:NL7COyOJHIo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=23D21sPUaQg:NL7COyOJHIo:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=23D21sPUaQg:NL7COyOJHIo:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/23D21sPUaQg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/5995605865714056039/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2013/04/download-geoflow-preview-for-excel-2013.html#comment-form" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/5995605865714056039?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/5995605865714056039?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/23D21sPUaQg/download-geoflow-preview-for-excel-2013.html" title="Download GeoFlow Preview for Excel 2013" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-hQGXf03mbNQ/UWbGDYV1b5I/AAAAAAAAFpo/9d5J_JmDyC8/s72-c/image_thumb.png?imgmax=800" height="72" width="72" /><thr:total>5</thr:total><feedburner:origLink>http://www.sqljason.com/2013/04/download-geoflow-preview-for-excel-2013.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcBRHo8fCp7ImA9WhBXEks.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-5100553466088681997</id><published>2013-03-25T22:14:00.001-04:00</published><updated>2013-03-25T22:14:15.474-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-25T22:14:15.474-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Spatial / Map Reports" /><category scheme="http://www.blogger.com/atom/ns#" term="Office 2013" /><title>GeoSpatial Analytics, Microsoft BI &amp; John Snow’s Cholera Map</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Throughout my childhood, I have always been fascinated by the idea of maps. It could be attributed to the number of pirate and treasure hunter stories that I used to voraciously devour. My dreams were filled with the protagonists in those books and their endless struggles to decipher the coded information in the maps. What used to strike me was that the location of the treasure was always present in the maps but still countless men were misled by them. Most of the times, it took the right person or the right context to get to the bottom of the map. As I grew older, my association with pirate / treasure hunter stories decreased (apart from watching the occasional &lt;a title="Pirates of the Caribbean (film series)" href="http://en.wikipedia.org/wiki/Pirates_of_the_Caribbean_(film_series)" target="_blank"&gt;Pirates of the Caribbean&lt;/a&gt; releases) but my bond with maps just went on getting stronger. Though my friends might joke that the reason for this is because I am so spatially disoriented (I still use a navigation system to travel from my home to the office which is &lt;u&gt;just a mile away&lt;/u&gt; for fear of getting lost), the real rationale is because I see a lot of value in geospatial analytics as a BI consultant. In today’s world, when more and more product companies are bringing forth tools to &lt;u&gt;easily&lt;/u&gt; analyse location based data, the excuses for not trying to analyse and explore geographic patterns in your business data are running dry. The Microsoft BI platform has a very able set of tools for geospatial analysis which includes SQL Server Reporting Services, Power View and Geo Flow (this is without including some of the map apps that are present in Office 2013) and helps me a lot in evangelizing geospatial analytics amongst my clients. While I was reading the news, I came to know that the last week was the 200&lt;sup&gt;th&lt;/sup&gt; birth anniversary of one of the pioneers of geospatial analysis as well as the father of modern epidemiology – &lt;a title="John Snow" href="http://en.wikipedia.org/wiki/John_Snow_(physician)" target="_blank"&gt;John Snow&lt;/a&gt;. I decided to pay my homage to him by following his adventure and reproducing his famous &lt;a title="1854 Broad Street Cholera Outbreak" href="http://en.wikipedia.org/wiki/1854_Broad_Street_cholera_outbreak" target="_blank"&gt;1854 Broad Street Cholera Outbreak&lt;/a&gt; map using Microsoft BI.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/---0YkVDZq3o/UVEETB4bo0I/AAAAAAAAFn4/aSG0InSehSw/s1600-h/image%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="GeoSpatial Analytics, Microsoft BI &amp;amp; John Snow&amp;rsquo;s Cholera Map" border="0" alt="GeoSpatial Analytics, Microsoft BI &amp;amp; John Snow&amp;rsquo;s Cholera Map" src="http://lh6.ggpht.com/-JF87yldkuMA/UVEETg3S0OI/AAAAAAAAFoA/Jq0kMOa-Uro/image_thumb%25255B1%25255D.png?imgmax=800" width="498" height="261"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Before we start, it might be interesting to set the context to the 19&lt;sup&gt;th&lt;/sup&gt; century London. London was evolving into a big city with a large influx of people, but without the modern day facilities and sanitary services. Houses used to have cesspools below their basements and human as well as animal wastes were accumulated there. Initially, people seemed to forget about the cesspools below and somehow thought that the wastes would get disposed magically, till the cesspools started overrunning. That is when the London government decided to dispose the waste into River Thames (which was also the source for water supply). You can imagine London at that time – stinking with all the human and animal wastes and it was no wonder that diseases were rampant at that time. The reason for the diseases were all attributed to the pollution and foul air emanating from those wastes. John Snow was a big sceptic of this theory though he had no evidence to prove otherwise. That is around when there was a major outbreak of Cholera in the Soho district of London and he decided to investigate it further. I am not 100% sure of how he actually did his investigation, but I am pretty sure that he must have at least gone through some variations (if not exact) of the four main sections in any treasure-hunting plot :-&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;font color="#008000"&gt;&lt;strong&gt;1) Collecting the Data (or acquiring the Map!)&lt;/strong&gt;&lt;/font&gt;&lt;br&gt;The first section of most treasure hunter stories weave through the part where the protagonist goes through shady alleys and dilapidated shops to find the treasure map from some ancient hawker. Likewise, John Snow might have gone through the disease laden streets to pick up the statistics on the cholera deaths and their locations. Luckily for me, I just had to search the internet and got the data (thanks to &lt;a title="John Snow&amp;rsquo;s famous cholera analysis data in modern GIS formats" href="http://blog.rtwilson.com/john-snows-famous-cholera-analysis-data-in-modern-gis-formats/" target="_blank"&gt;Robin Wilson&lt;/a&gt;). You can download a copy of the data from &lt;strong&gt;&lt;u&gt;&lt;a title="Download &amp;quot;Cholera Pumps &amp;amp; Deaths.csv&amp;quot;" href="https://docs.google.com/file/d/0B1k6zmQ4NXQlT0luV0pITGk3dUE/edit?usp=sharing" target="_blank"&gt;here&lt;/a&gt;&lt;/u&gt;&lt;/strong&gt;. I did some simple changes to the source data to extract the longitude and the latitude columns from the geometry column as shown below (pro tip: use the &lt;a title="Flash Fill feature of Excel 2013" href="http://blogs.office.com/b/microsoft-excel/archive/2012/08/08/flash-fill.aspx" target="_blank"&gt;Flash Fill feature of Excel 2013&lt;/a&gt;).&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-SVxP0ZoqD9Y/UVEEUL69MxI/AAAAAAAAFoI/fbdXYCuxnOo/s1600-h/image%25255B7%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Cholera death stats" border="0" alt="Cholera death stats" src="http://lh5.ggpht.com/-v7tsYXja0OE/UVEEU0Z8WFI/AAAAAAAAFoQ/-rGqYCD8_5M/image_thumb%25255B3%25255D.png?imgmax=800" width="504" height="319"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;font color="#008000"&gt;&lt;strong&gt;2) Exploring the data patterns (or deciphering the Map!)&lt;/strong&gt;&lt;/font&gt;&lt;br&gt;The plot continues where the protagonist tries to make sense out of the map. Treasure maps are never straightforward and he takes a lot of time to see whether there are any hidden clues or markers in the map. Similarly, John Snow must have spent a lot of time studying the statistics as well as exploring the data visually for geographic patterns. I decided to visualize the data using Power View initially to check for any patterns.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-oDG6rYt5Rgw/UVEEVzkIPgI/AAAAAAAAFoY/_nvXAtkeftA/s1600-h/image%25255B11%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Cholera death visualization using Power View" border="0" alt="Cholera death visualization using Power View" src="http://lh6.ggpht.com/-f_JY2qdcUsk/UVEEWRejDFI/AAAAAAAAFog/U0_jBoNGRzk/image_thumb%25255B5%25255D.png?imgmax=800" width="504" height="368"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Just as the protagonist tries different approaches, I decided to also use GeoFlow to visualize the same data.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-Wu-6thE7oTw/UVEEX1lb_QI/AAAAAAAAFoo/eT5MUghDARw/s1600-h/image%25255B15%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Cholera Deaths layer" border="0" alt="Cholera Deaths layer" src="http://lh6.ggpht.com/-0dJO3EBFsr8/UVEEasTKq2I/AAAAAAAAFow/CXA5Zwl96EY/image_thumb%25255B7%25255D.png?imgmax=800" width="504" height="357"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;The heatmap visualization in GeoFlow indicated something that Power View didn’t show that explicitly - unusually large number of deaths around the red area.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;strong&gt;3) Investigating the Outliers / Patterns (or Validating the potential Treasure locations)&lt;/strong&gt;&lt;/font&gt;&lt;br&gt;This is one of the most crucial part of the story, where the protagonist tries to cross check and re-validate the patterns or code that he has found within the map. This is what is going to distinguish him from the countless men that have lost their lives in search of the treasure. He makes sure that the clues that he has got from the map is not a red-herring. This is what John Snow did too, as is his evident from his writings – “&lt;em&gt;&lt;font color="#a5a5a5"&gt;On proceeding to the spot, I found that nearly all the deaths had taken place within a short distance of the [Broad Street] pump. There were only ten deaths in houses situated decidedly nearer to another street-pump. In five of these cases the families of the deceased persons informed me that they always sent to the pump in Broad Street, as they preferred the water to that of the pumps which were nearer. In three other cases, the deceased were children who went to school near the pump in Broad Street...&lt;/font&gt;&lt;/em&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;&lt;em&gt;&lt;font color="#a5a5a5"&gt;With regard to the deaths occurring in the locality belonging to the pump, there were 61 instances in which I was informed that the deceased persons used to drink the pump water from Broad Street, either constantly or occasionally...&lt;/font&gt;&lt;/em&gt;”. As for all of us, we already know the cause and hence all I had to do currently was to display the pumps also as another layer in GeoFlow and to see the correlation of deaths and proximity of pump.&lt;/font&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-M7RI0pC1Drg/UVEEb-YcDBI/AAAAAAAAFo4/8mL9lOqzW_0/s1600-h/image%25255B19%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Cholera Deaths layer with the Pumps layer" border="0" alt="Cholera Deaths layer with the Pumps layer" src="http://lh6.ggpht.com/-6edQY1d6G2o/UVEEcvZWUgI/AAAAAAAAFpA/mauN43g-9lE/image_thumb%25255B9%25255D.png?imgmax=800" width="504" height="388"&gt;&lt;/a&gt;    &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Isn’t it amazing to see how accurately GeoFlow has plotted the problem causing Broad Street pump right in the area of the maximum deaths!&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;strong&gt;4) Visualizing and Sharing the Results (or finding the Treasure!)&lt;/strong&gt;&lt;/font&gt;&lt;br&gt;This is the final part of the story where the protagonist undertakes the arduous journey to find (and hopefully claims) the treasure. The journey is not easy and there are every chance that he might be misled like the countless many before him. Similarly, in geospatial analysis, it is very easy to get carried away and share wrong results. &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a title="http://xkcd.com/1138/" href="http://xkcd.com/1138/" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="xkcd" border="0" alt="xkcd" src="http://lh3.ggpht.com/-sGuWRIaXlCs/UVEEdFHhvhI/AAAAAAAAFpI/SvWwY7oauSs/image%25255B32%25255D.png?imgmax=800" width="504" height="411"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;However, John Snow’s map (shown below) was very instrumental in convincing the London authorities to shut down the problem causing Broad Street Pump and history says that this helped in containing the outbreak.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;img alt="File:Snow-cholera-map-1.jpg" src="http://upload.wikimedia.org/wikipedia/commons/thumb/2/27/Snow-cholera-map-1.jpg/643px-Snow-cholera-map-1.jpg" width="500" height="467"&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;If done correctly, geospatial analysis is extremely powerful and with technologies like Power View and GeoFlow, this can be done pretty easily and quickly. If you are interested in geospatial analysis or Business Analytics in general, it’s still not late to &lt;a title="Register for PASS BA Conf" href="http://passbaconference.com/Register.aspx#.UVEBsBysh8E" target="_blank"&gt;&lt;strong&gt;register&lt;/strong&gt;&lt;/a&gt; for the &lt;a title="PASS BA Conference" href="http://passbaconference.com/" target="_blank"&gt;PASS BA Conference&lt;/a&gt; happening on Apr 10-12, 2013. And if you do register, don’t forget to attend my session on &lt;a title="GeoSpatial Analytics using Microsoft BI" href="http://passbaconference.com/Sessions/SessionDetails.aspx?sid=3991#.UVEB_hysh8F" target="_blank"&gt;GeoSpatial Analytics using Microsoft BI&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a title="GeoSpatial Analytics using Microsoft BI" href="http://passbaconference.com/Sessions/SessionDetails.aspx?sid=3991#.UVEB_hysh8F" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="GeoSpatial Analytics using Microsoft BI" border="0" alt="GeoSpatial Analytics using Microsoft BI" src="http://lh6.ggpht.com/-gg7k2Qzu4eo/UVEEduqyWnI/AAAAAAAAFpM/_2C0dDfqjJo/image%25255B31%25255D.png?imgmax=800" width="504" height="241"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;You can download the completed Excel 2013 file with the Power View and GeoFlow visualizations from &lt;a title="Download &amp;quot;Cholera Pumps &amp;amp; Deaths.xlsx&amp;quot;" href="https://docs.google.com/file/d/0B1k6zmQ4NXQlZ0dBcjFrNWhUSTA/edit?usp=sharing" target="_blank"&gt;here&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=dxXDrhThY_A:PEAR94c75b0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=dxXDrhThY_A:PEAR94c75b0:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=dxXDrhThY_A:PEAR94c75b0:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/dxXDrhThY_A" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/5100553466088681997/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2013/03/geospatial-analytics-microsoft-bi-john.html#comment-form" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/5100553466088681997?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/5100553466088681997?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/dxXDrhThY_A/geospatial-analytics-microsoft-bi-john.html" title="GeoSpatial Analytics, Microsoft BI &amp;amp; John Snow’s Cholera Map" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-JF87yldkuMA/UVEETg3S0OI/AAAAAAAAFoA/Jq0kMOa-Uro/s72-c/image_thumb%25255B1%25255D.png?imgmax=800" height="72" width="72" /><thr:total>6</thr:total><feedburner:origLink>http://www.sqljason.com/2013/03/geospatial-analytics-microsoft-bi-john.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUYDRH0_cSp7ImA9WhBQEkQ.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-7030910039726044057</id><published>2013-03-12T23:02:00.001-04:00</published><updated>2013-03-14T17:39:35.349-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-14T17:39:35.349-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Office 2013" /><category scheme="http://www.blogger.com/atom/ns#" term="Data Explorer" /><title>Unpivoting Data in Data Explorer</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Data Explorer is generating a lot of positive buzz within the community and everyone I speak to seems to be really excited about this. (If you are wondering what Data Explorer is, you might want to quickly catch up on my previous post - &lt;a title="Introduction to Data Explorer Preview for Excel" href="http://www.sqljason.com/2013/03/introduction-to-data-explorer-preview.html" target="_blank"&gt;Introduction to Data Explorer Preview for Excel&lt;/a&gt;). And just today, the Data Explorer team announced &lt;a title="A new build of &amp;ldquo;Data Explorer&amp;rdquo;, and an Auto Update feature" href="http://blogs.msdn.com/b/dataexplorer/archive/2013/03/12/a-new-build-of-data-explorer-and-an-auto-update-feature.aspx" target="_blank"&gt;A new build of “Data Explorer”, and an Auto Update feature&lt;/a&gt; (must say I really like the idea of Update button). This was followed by a post from Jamie Thomson aka SSIS Junkie (&lt;a href="http://sqlblog.com/blogs/jamie_thomson/" target="_blank"&gt;blog&lt;/a&gt; | &lt;a href="https://twitter.com/jamiet" target="_blank"&gt;twitter&lt;/a&gt;) on the query language ( M ) in Data Explorer and you can read more about that &lt;a title="M lives!" href="http://sqlblog.com/blogs/jamie_thomson/archive/2013/03/12/m-lives.aspx" target="_blank"&gt;here&lt;/a&gt;. All this made me really excited and I also decided to contribute something through this post. &lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-6rqR0s6hWS0/UT_sG4hBDdI/AAAAAAAAFkc/6fa-mWzhkj0/s1600-h/image%25255B2%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="Unpivot rows in data explorer" border="0" alt="Unpivot rows in data explorer" src="http://lh3.ggpht.com/-sq92cI7ICvU/UT_sHWnG-WI/AAAAAAAAFkk/o9GvsXOcdbE/image_thumb.png?imgmax=800" width="486" height="265"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;It is a pretty common requirement to unpivot data, especially when you are scourging the net for open data. Data Explorer currently does not have any feature to unpivot data but the query language looked pretty solid and I decided to give it a try (actually, this exercise started as a way to test the new query editing functionality in Data Explorer). Well, I did succeed though it might not look that easy (if you do find an easier way, please share it!). Read on for the solution:-&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;1) The source for my post is given below&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-_8yD-7p405A/UT_sHrzbdrI/AAAAAAAAFks/pp2pbqM-5xY/s1600-h/image%25255B5%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="source data" border="0" alt="source data" src="http://lh5.ggpht.com/-ULgWHFtg--U/UT_sIIpFftI/AAAAAAAAFk0/if0VTeyGb7c/image_thumb%25255B1%25255D.png?imgmax=800" width="268" height="94"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;I just made a simple table in the excel spreadsheet which gives the Sales by State for the years 2010 to 2012. I then click on the From Table option in Data Explorer tab to get the query window as shown below.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-L6rw2e8rUA4/UT_sIWPPAfI/AAAAAAAAFk8/G76vP8IcT6Y/s1600-h/image%25255B8%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Import data from excel" border="0" alt="Import data from excel" src="http://lh5.ggpht.com/-wrn3HCh4xPA/UT_sJEd1gRI/AAAAAAAAFlE/C2afzPOSu98/image_thumb%25255B2%25255D.png?imgmax=800" width="482" height="265"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;2) I add a new column called JCol with a value of 1 using the expression below&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3" size="2"&gt;= Table.AddColumn(Excel.CurrentWorkbook(){[Name="Table37"]}[Content], "JCol", each 1)&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-R52bVxXDPSM/UT_sJVXfX6I/AAAAAAAAFlM/SKxPOv1oqog/s1600-h/image%25255B11%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Add join column to first table" border="0" alt="Add join column to first table" src="http://lh5.ggpht.com/-dX9LR2Kc0DQ/UT_sJ0Dyc4I/AAAAAAAAFlU/9b-1zxyZVaY/image_thumb%25255B3%25255D.png?imgmax=800" width="504" height="152"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Now this is my first table, and I store the expression with me. &lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;3) My next objective is to make a transpose of the original table. This can be done with the expression below&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3" size="2"&gt;= Table.PromoteHeaders(Table.Transpose(Table.DemoteHeaders(Excel.CurrentWorkbook(){[Name="Table37"]}[Content])))&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-09voHuK_U_A/UT_sKEkOKhI/AAAAAAAAFlc/GupMbL1TfI8/s1600-h/image%25255B14%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Transpose table" border="0" alt="Transpose table" src="http://lh4.ggpht.com/--eC39AqO7tI/UT_sKquml5I/AAAAAAAAFlk/Pb_uL_chSEU/image_thumb%25255B4%25255D.png?imgmax=800" width="504" height="189"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;4) Now we need to rename the State Column to Year.&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3" size="2"&gt;= Table.RenameColumns(Table.PromoteHeaders(Table.Transpose(Table.DemoteHeaders(Excel.CurrentWorkbook(){[Name="Table37"]}[Content]))), {"State","Year"})&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-fEe9XW7uWfs/UT_sLIKfU8I/AAAAAAAAFls/iciCgxbfaC4/s1600-h/image%25255B17%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Rename column" border="0" alt="Rename column" src="http://lh6.ggpht.com/-PTNmMh_hbis/UT_sLsAc1TI/AAAAAAAAFl0/-k1BQFlqbxw/image_thumb%25255B5%25255D.png?imgmax=800" width="504" height="190"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;5) Now, we need to add a column to this resultant table called JCol (just as we did to the first table in Step 2).&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3" size="2"&gt;= Table.AddColumn(Table.RenameColumns(Table.PromoteHeaders(Table.Transpose(Table.DemoteHeaders(Excel.CurrentWorkbook(){[Name="Table37"]}[Content]))), {"State","Year"}), "JCol", each 1)&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-rA3hS4h3lsE/UT_sMHUmXiI/AAAAAAAAFl8/vHyu2-hSRQw/s1600-h/image%25255B20%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Add join column to second table" border="0" alt="Add join column to second table" src="http://lh4.ggpht.com/-_XYdsQmxfJg/UT_sMb1PBXI/AAAAAAAAFmE/-aI_o7j-nDw/image_thumb%25255B6%25255D.png?imgmax=800" width="504" height="184"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;6) You might be wondering at this stage why we created the JCol column in both the tables. The reason is that we need to cross join both of these tables so that we get extra rows, and the join column is going to be JCol. Since the values for the join column are all the same, we get a cross join. To do the join of both the tables, delete the existing expression and enter the expression below&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3" size="2"&gt;= Table.Join(&lt;font color="#0000ff"&gt;Table.AddColumn(Excel.CurrentWorkbook(){[Name="Table37"]}[Content], "JCol", each 1)&lt;/font&gt;&lt;strong&gt;,&lt;/strong&gt; &lt;font color="#0000ff"&gt;"JCol"&lt;/font&gt;&lt;strong&gt;,&lt;/strong&gt; &lt;font color="#008000"&gt;Table.AddColumn(Table.RenameColumns(Table.PromoteHeaders(Table.Transpose(Table.DemoteHeaders(Excel.CurrentWorkbook(){[Name="Table37"]}[Content]))), {"State","Year&lt;/font&gt;&lt;font color="#008040"&gt;"})&lt;strong&gt;&lt;font color="#9b00d3"&gt;,&lt;/font&gt;&lt;/strong&gt; "JCol", each 1)&lt;/font&gt;&lt;strong&gt;,&lt;/strong&gt; &lt;font color="#008040"&gt;"JCol"&lt;/font&gt;)&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-O1WIxRewB0c/UT_sM-vTopI/AAAAAAAAFmM/ROzyjrFGFP4/s1600-h/image%25255B23%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Join both the table expressions" border="0" alt="Join both the table expressions" src="http://lh5.ggpht.com/-WJPo3mDy8i8/UT_sNXj4RiI/AAAAAAAAFmU/QSoRt12CTtc/image_thumb%25255B7%25255D.png?imgmax=800" width="504" height="264"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;7) Now add a new calculated column which will give you the value in NC column if State is NC, SC column if State is SC and FL column if State is FL.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-5fynIhcRRes/UT_sNsFEASI/AAAAAAAAFmc/nNu6_DYIH1I/s1600-h/image%25255B26%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Add custom column for Sales" border="0" alt="Add custom column for Sales" src="http://lh6.ggpht.com/-tBJdNWbJKiY/UT_sOOe674I/AAAAAAAAFmk/LgNKD5ZnuDM/image_thumb%25255B8%25255D.png?imgmax=800" width="489" height="265"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;The expression for the calculated column is given below&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3" size="2"&gt;if [State] = "NC" then [NC] else if [State]= "SC" then [SC] else [FL]&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-vJayuKAGevQ/UT_sOftvZyI/AAAAAAAAFms/wCTPzfXW1gM/s1600-h/image%25255B29%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="custom column expression" border="0" alt="custom column expression" src="http://lh6.ggpht.com/-OBqKK-fvkng/UT_sO37TezI/AAAAAAAAFm0/qgAFYlabYIM/image_thumb%25255B9%25255D.png?imgmax=800" width="504" height="216"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;Now your result should look like shown below&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-SxPhZrUpH8E/UT_sPfJSWtI/AAAAAAAAFm8/fefK9Pt0b_o/s1600-h/image%25255B32%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="end result of custom calculation" border="0" alt="end result of custom calculation" src="http://lh3.ggpht.com/-0VDe0HmrNKY/UT_sP_GsNwI/AAAAAAAAFnE/28TJ6ZMXW34/image_thumb%25255B10%25255D.png?imgmax=800" width="504" height="190"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;8) Now all you have to do is to rename the Custom column to Sales and hide the unnecessary columns. Then you will be able to see the unpivoted data as shown below&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-Q1Cm7EipHHE/UT_sQSEXaFI/AAAAAAAAFnM/6RIFaO7vCGo/s1600-h/image%25255B36%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="rename and hide unnecessary columns" border="0" alt="rename and hide unnecessary columns" src="http://lh4.ggpht.com/-7rFSVttxYAQ/UT_sQzXRwgI/AAAAAAAAFnU/GFHWUzSpDek/image_thumb%25255B15%25255D.png?imgmax=800" width="500" height="200"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;9) Also, have a look at how the actual query looks like in the advanced query editor&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-vN4AQ41_7D8/UT_sRBHer1I/AAAAAAAAFnc/ouXT3s56Npo/s1600-h/image%25255B39%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Advanced query editor" border="0" alt="Advanced query editor" src="http://lh3.ggpht.com/-VdsHn23yDZ8/UT_sRjqZlDI/AAAAAAAAFnk/Cg5H-x_0nmA/image_thumb%25255B16%25255D.png?imgmax=800" width="383" height="265"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;I would like to see a word-wrap option for the advanced query editor so that I don’t have to scroll over to the right to see long formulas. Apart from that, looks great! Don’t forget to share your comments as well as your posts / experiences with Data Explorer and it’s query language.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;&lt;u&gt;Update&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;I got quite some requests asking for the actual query. So here it is&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p align="left"&gt;&lt;font color="#9b00d3" size="2"&gt;let&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#000000"&gt;Source&lt;/font&gt; = Table.Join(Table.AddColumn(Excel.CurrentWorkbook(){[Name="Table37"]}[Content], "JCol", each 1), "JCol", Table.AddColumn(Table.RenameColumns(Table.PromoteHeaders(Table.Transpose(Table.DemoteHeaders(Excel.CurrentWorkbook(){[Name="Table37"]}[Content]))), {"State","Year"}), "JCol", each 1), "JCol"),&lt;br&gt;&amp;nbsp;&amp;nbsp; &lt;font color="#000000"&gt; InsertedCustom&lt;/font&gt; = Table.AddColumn(Source, "Custom", each if [State] = "NC" then [NC] else if [State]= "SC" then [SC] else [FL]),&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#000000"&gt;RenamedColumns&lt;/font&gt; = Table.RenameColumns(InsertedCustom,{{"Custom", "Sales"}}),&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#000000"&gt;HiddenColumns&lt;/font&gt; = Table.RemoveColumns(RenamedColumns,{"2010", "2011", "2012", "JCol", "NC", "SC", "FL"})&lt;br&gt;in&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HiddenColumns&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="left"&gt;&lt;font color="#000000" size="2"&gt;Remember to change the name of the table name when you use it.&lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=fAYM7l3HMEk:-7PpfbmbI0g:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=fAYM7l3HMEk:-7PpfbmbI0g:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=fAYM7l3HMEk:-7PpfbmbI0g:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/fAYM7l3HMEk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/7030910039726044057/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2013/03/unpivoting-data-in-data-explorer.html#comment-form" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/7030910039726044057?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/7030910039726044057?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/fAYM7l3HMEk/unpivoting-data-in-data-explorer.html" title="Unpivoting Data in Data Explorer" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-sq92cI7ICvU/UT_sHWnG-WI/AAAAAAAAFkk/o9GvsXOcdbE/s72-c/image_thumb.png?imgmax=800" height="72" width="72" /><thr:total>6</thr:total><feedburner:origLink>http://www.sqljason.com/2013/03/unpivoting-data-in-data-explorer.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUAR3k9eip7ImA9WhBQEUk.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-1466139310508253848</id><published>2013-03-04T09:00:00.000-05:00</published><updated>2013-03-12T23:10:46.762-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-12T23:10:46.762-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Office 2013" /><category scheme="http://www.blogger.com/atom/ns#" term="Data Explorer" /><title>Introduction to Data Explorer Preview for Excel</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;It’s just been a couple of days since this add-in has been released and I can’t seem to stop using it. I guess I haven’t been this excited about a Microsoft offering since SSRS 2008 R2 (well, I am really passionate about Tabular and PowerPivot now but I wasn’t that hooked onto those technologies when they were released). As a BI consultant, blogger and speaker, I traverse through lots and loads of open data - sometimes trying to get that extra piece of open data which will add value to my clients’ existing data or to get some interesting stuff for my blogs and presentations. Data Explorer might not be the perfect solution, but it sure does a splendid job of reducing my efforts in searching, shaping and preparing my data. I thought of sharing my experiences in the form of a quick introduction to Data Explorer Preview for Excel.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;/font&gt;&lt;a href="http://lh6.ggpht.com/-Rorpaq2PQQE/UTP9xYphveI/AAAAAAAAFhE/Tx9N9CeH3jY/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="Introduction to Data Explorer Preview for Excel" border="0" alt="Introduction to Data Explorer Preview for Excel" src="http://lh3.ggpht.com/-mVEV-bri-xk/UTP9x9xo0KI/AAAAAAAAFhM/6pmbl0XHpEM/image_thumb%25255B2%25255D.png?imgmax=800" width="407" height="225"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;1) &lt;u&gt;What is Data Explorer Preview for Excel and where can I get it from?&lt;/u&gt;&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Microsoft “Data Explorer” Preview for Excel is an add-in for Excel 2013 which provides an intuitive user interface for data discovery, data transformation and enrichment. You can download the add-in from &lt;a title="Download Microsoft &amp;quot;Data Explorer&amp;quot; Preview for Excel" href="http://www.microsoft.com/en-us/download/details.aspx?id=36803" target="_blank"&gt;&lt;strong&gt;&lt;u&gt;here&lt;/u&gt;&lt;/strong&gt;&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#008040" size="2"&gt;&lt;strong&gt;2) &lt;u&gt;Basic Tutorial for Data Explorer&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;You can import data into excel from a wide variety of sources using Data Explorer and the complete list of sources is given &lt;strong&gt;&lt;u&gt;&lt;a title="Import data from external data sources" href="http://office.microsoft.com/en-us/excel-help/import-data-from-external-data-sources-HA104003952.aspx?CTT=5&amp;amp;origin=HA104003813" target="_blank"&gt;here&lt;/a&gt;&lt;/u&gt;&lt;/strong&gt;. For the purpose of this demo, I am going to be connecting to my favourite source which is the ‘web page’ source.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;a) After installing the add-in, you should be able to see the Data Explorer tab in Excel (if not, go to File—&amp;gt;Options—&amp;gt;Add-Ins—&amp;gt;Com Add-Ins and enable the Data Explorer add-in). Click on the &lt;em&gt;From Web &lt;/em&gt;option and enter the url - &lt;a title="http://www.nuforc.org/webreports/ndxloc.html" href="http://www.nuforc.org/webreports/ndxloc.html"&gt;http://www.nuforc.org/webreports/ndxloc.html&lt;/a&gt; as shown below.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-6_XcA28MMg0/UTP9yZqToiI/AAAAAAAAFhU/2DiqCX_GQy0/s1600-h/image%25255B7%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Import From Web " border="0" alt="Import From Web " src="http://lh5.ggpht.com/-extymmM7lcs/UTP9yiUf1sI/AAAAAAAAFhc/Fe8iQ1517_8/image_thumb%25255B3%25255D.png?imgmax=800" width="504" height="234"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;b) Now click on Table 0 in the Navigator pane and you should be able to see the UFO sightings by states. The table has some non-US data and so to filter them, click on the dropdown in the reports column and unselect them. Click on OK when you are done.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/--2O5MUTPDuA/UTP9zcdbR9I/AAAAAAAAFhk/YVGnm1GSxVU/s1600-h/image%25255B14%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Unselect unnecessary data" border="0" alt="Unselect unnecessary data" src="http://lh3.ggpht.com/-z4XAlIPZgc8/UTP9z9GEgPI/AAAAAAAAFhs/dJIeAxcSY2Y/image_thumb%25255B6%25255D.png?imgmax=800" width="304" height="321"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;c) Rename the columns as States and UFO Sightings respectively. Notice that the Steps pane on the right shows the modifications you are making and you can expand the pane.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-fWGwZ0jusqs/UTP90Rc17cI/AAAAAAAAFh0/Nla6mhQf2HI/s1600-h/image%25255B27%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="rename columns" border="0" alt="rename columns" src="http://lh5.ggpht.com/-qtF9gDvLR0Y/UTP908bKkTI/AAAAAAAAFh8/QhOtpDgk2QM/image_thumb%25255B13%25255D.png?imgmax=800" width="404" height="303"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;d) Click on Done and now you can see the data in Excel. This data can be used as a source for &lt;/font&gt;&lt;font color="#000000"&gt;your charts / tables and in the image below, I have used the “Geographic Heat Map” Office app to visualize the same. Looks like the aliens have taken a liking for California!&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-i96Otkkbaf8/UTP91SqRlzI/AAAAAAAAFiE/7cfIqRLoVgM/s1600-h/image%25255B24%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Data visualized using Heat Map" border="0" alt="Data visualized using Heat Map" src="http://lh6.ggpht.com/-PCJUqSHb2pk/UTP91uIMB1I/AAAAAAAAFiM/kcgkC8tHHZk/image_thumb%25255B10%25255D.png?imgmax=800" width="404" height="297"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#008040" size="2"&gt;&lt;strong&gt;3) &lt;u&gt;Interesting Features&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;a) &lt;u&gt;Online Search&lt;/u&gt;&lt;/strong&gt;:- I spend a lot of time trying to search for open datasets and this feature is surely going to reduce that time. You can search for data right from Excel by clicking on the &lt;em&gt;Online Search&lt;/em&gt; button. For eg, if I search for ‘richest states’, the results as shown below.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-JG9tKDM7Hm8/UTP92Ui4WfI/AAAAAAAAFiU/VbPsNT-MMj4/s1600-h/image%25255B25%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Online Search option" border="0" alt="Online Search option" src="http://lh6.ggpht.com/-1Wrp4iLg4zA/UTP93O-iICI/AAAAAAAAFic/e33FP0XntxA/image_thumb%25255B11%25255D.png?imgmax=800" width="404" height="256"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Just scroll your mouse over the results and click on &lt;em&gt;Use &lt;/em&gt;to add the data.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;b) &lt;u&gt;Filter &amp;amp; Shape Data&lt;/u&gt;&lt;/strong&gt;:- The ability to filter and transform your data is what makes this so useful. You can just click on the &lt;em&gt;Filter &amp;amp; Shape&lt;/em&gt; button to start the process as shown below.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-tvPaWYppEdA/UTP93rXbyGI/AAAAAAAAFik/AUdDWzqRMTc/s1600-h/image%25255B30%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Filter &amp;amp; shape data" border="0" alt="Filter &amp;amp; shape data" src="http://lh3.ggpht.com/-OWR3u98WSGI/UTP94OxrU8I/AAAAAAAAFis/bKPcp7ubeQQ/image_thumb%25255B14%25255D.png?imgmax=800" width="384" height="265"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;For eg, if you just want to show the income for 2011, you can hide the rest of the columns as shown below.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-9hw3pWBp9Rs/UTP94ikd6aI/AAAAAAAAFi0/iwc6Z7_B11o/s1600-h/image%25255B33%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Hide unnecessary columns" border="0" alt="Hide unnecessary columns" src="http://lh5.ggpht.com/-pvyHQGE-vH4/UTP9440KQzI/AAAAAAAAFi8/NwpcbdC93bI/image_thumb%25255B15%25255D.png?imgmax=800" width="504" height="217"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;You can also do a lot of other operations like Splitting columns, removing duplicates, replacing values, changing types, group-by, etc. &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-9klfQpuTFWo/UTP95syR5lI/AAAAAAAAFjE/8VUsqsb0xmg/s1600-h/image%25255B38%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Types of transforms available" border="0" alt="Types of transforms available" src="http://lh5.ggpht.com/-wG-3cZ8_UJI/UTP96JipayI/AAAAAAAAFjM/1wStmMKjolw/image_thumb%25255B18%25255D.png?imgmax=800" width="504" height="358"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;You can read the complete list from &lt;a title="Shape data" href="http://office.microsoft.com/en-us/excel-help/shape-data-HA104003957.aspx?CTT=5&amp;amp;origin=HA104003813" target="_blank"&gt;&lt;strong&gt;&lt;u&gt;here&lt;/u&gt;&lt;/strong&gt;&lt;/a&gt;. Hopefully, there will be more additions to this in the future (I could definitely use a Unpivot / Pivot option).&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;c) &lt;u&gt;Merging &amp;amp; Appending from Multiple Sources&lt;/u&gt;&lt;/strong&gt;:- This is another killer feature in Data Explorer. You can merge or append from multiple sources. For eg, if we have to merge the two sheets that we just created, click on the Merge button and then select the primary and secondary tables from the dropdown.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-NZV0mr9qtyI/UTP96lqlpTI/AAAAAAAAFjU/M5v6ve0_Lf0/s1600-h/image%25255B42%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Merge data from two sources" border="0" alt="Merge data from two sources" src="http://lh5.ggpht.com/-LP0UXGRE37c/UTP97DVBlDI/AAAAAAAAFjc/YIk2GjxkEGM/image_thumb%25255B20%25255D.png?imgmax=800" width="404" height="428"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Then select the matching columns from both the tables and click on &lt;em&gt;Apply&lt;/em&gt;. &lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-IJskxR-Zn0Y/UTP97adqGII/AAAAAAAAFjk/zhtyMVtGkos/s1600-h/image%25255B45%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="select matching columns" border="0" alt="select matching columns" src="http://lh6.ggpht.com/-8sa6dGgaLMw/UTP976rn5II/AAAAAAAAFjs/HUTGPdcm7fM/image_thumb%25255B21%25255D.png?imgmax=800" width="315" height="265"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Now, to display the additional columns, click on the expand icon on the New Column and select the UFO sightings. Click on OK.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-etFa7-eujCM/UTP98cZ83LI/AAAAAAAAFj0/Nh4QUkZfa5k/s1600-h/image%25255B48%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Expand columns" border="0" alt="Expand columns" src="http://lh5.ggpht.com/-pNsLW-US3UA/UTP9897u3cI/AAAAAAAAFj8/NM0R5uFmq5o/image_thumb%25255B22%25255D.png?imgmax=800" width="504" height="143"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Now you have combined both the sources and can use it for your visualization. I have visualized the same data using GeoFlow below.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-OiyeQiabh5c/UTP9988O9SI/AAAAAAAAFkE/w1pUpfoXWTw/s1600-h/image%25255B51%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Data visualized using GeoFlow" border="0" alt="Data visualized using GeoFlow" src="http://lh6.ggpht.com/-jOKodVBXIl4/UTP9-XKxuQI/AAAAAAAAFkM/3gf8GnioVp8/image_thumb%25255B23%25255D.png?imgmax=800" width="493" height="265"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#008040" size="2"&gt;&lt;strong&gt;4) &lt;u&gt;Further Reading&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;There’s lot of interesting stuff you can do with Data Explorer and if this post caught your interest, make sure to check the below ones too&lt;/font&gt;&lt;/p&gt; &lt;h1&gt;&lt;font size="2"&gt;&lt;font style="font-weight: normal"&gt;1) Data Explorer Team - &lt;/font&gt;&lt;/font&gt;&lt;a title="Announcing Microsoft &amp;ldquo;Data Explorer&amp;rdquo; Preview for Excel" href="http://blogs.msdn.com/b/dataexplorer/archive/2013/02/27/announcing-microsoft-data-explorer-preview-for-excel.aspx" target="_blank"&gt;&lt;font size="2"&gt;&lt;font style="font-weight: normal"&gt;Announcing Microsoft “Data Explorer” Preview for Excel&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size="2"&gt;&lt;font style="font-weight: normal"&gt;2) Chris Webb - &lt;/font&gt;&lt;a title="Importing Data From Multiple Log Files Using Data Explorer" href="http://cwebbbi.wordpress.com/2013/03/01/importing-data-from-multiple-log-files-using-data-explorer/" target="_blank"&gt;&lt;font style="font-weight: normal"&gt;Importing Data From Multiple Log Files Using Data Explorer&lt;/font&gt;&lt;/a&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;&lt;font style="font-weight: normal"&gt;3) Chris Webb - &lt;/font&gt;&lt;font style="font-weight: normal"&gt;&lt;a title="Calling A Web Service From Data Explorer, Part 1" href="http://cwebbbi.wordpress.com/2013/03/04/calling-a-web-service-from-data-explorer-part-1/" target="_blank"&gt;Calling A Web Service From Data Explorer, Part 1&lt;/a&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size="2"&gt;&lt;font style="font-weight: normal"&gt;4) Jamie Thomson - &lt;/font&gt;&lt;a title="Traversing the Facebook Graph using Data Explorer" href="http://sqlblog.com/blogs/jamie_thomson/archive/2013/02/28/traversing-the-facebook-graph-using-data-explorer.aspx" target="_blank"&gt;&lt;font style="font-weight: normal"&gt;Traversing the Facebook Graph using Data Explorer&lt;/font&gt;&lt;/a&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size="2"&gt;&lt;font style="font-weight: normal"&gt;5) Matt Masson - &lt;/font&gt;&lt;a title="Access the Windows Azure Marketplace from Data Explorer" href="http://www.mattmasson.com/index.php/2013/03/access-the-windows-azure-marketplace-from-data-explorer/" target="_blank"&gt;&lt;font style="font-weight: normal"&gt;Access the Windows Azure Marketplace from Data Explorer&lt;/font&gt;&lt;/a&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size="2"&gt;&lt;font style="font-weight: normal"&gt;6) Jake Smillie - &lt;/font&gt;&lt;a title="Best Oscar winning Film? My first Data Explorer adventure&amp;hellip;" href="http://community.altiusconsulting.com/best-oscar-winning-film-my-first-data-explorer-adventure/" target="_blank"&gt;&lt;font style="font-weight: normal"&gt;Best Oscar winning Film? My first Data Explorer adventure…&lt;/font&gt;&lt;/a&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size="2"&gt;&lt;font style="font-weight: normal"&gt;7) Ian Morrish - &lt;/font&gt;&lt;a title="SharePoint OData and the Excel Data Explorer" href="http://www.spsdemo.com/blog/Lists/Posts/Post.aspx?ID=371" target="_blank"&gt;&lt;font style="font-weight: normal"&gt;SharePoint OData and the Excel Data Explorer&lt;/font&gt;&lt;/a&gt;&lt;/font&gt;&lt;/h1&gt;&lt;font size="2"&gt;&lt;/font&gt; &lt;h1&gt;&lt;font size="2"&gt;&lt;font style="font-weight: normal"&gt;8) &lt;/font&gt;&lt;/font&gt;&lt;a title="Data Explorer Help" href="http://office.microsoft.com/en-us/excel-help/start-page-HA104003813.aspx" target="_blank"&gt;&lt;font size="2"&gt;&lt;font style="font-weight: normal"&gt;Data Explorer Help&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/h1&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="2"&gt;Updates&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;h1&gt;&lt;font size="2"&gt;&lt;font style="font-weight: normal"&gt;9) Dan English - &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;a title="Installing Data Explorer Preview &amp;amp; Demo with IMDB Data" href="http://denglishbi.wordpress.com/2013/03/04/installing-data-explorer-preview-demo-with-imdb-data/" target="_blank"&gt;&lt;font style="font-weight: normal"&gt;Installing Data Explorer Preview &amp;amp; Demo with IMDB Data&lt;/font&gt;&lt;/a&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size="2"&gt;&lt;font style="font-weight: normal"&gt;10) Alan Koo - &lt;a title="Introduction to Microsoft Data Explorer Preview for Excel 2013 - Part 1" href="http://www.alankoo.com/2013/03/microsoft-data-explorer-preview-for.html"&gt;Introduction to Microsoft Data Explorer Preview for Excel 2013 - Part 1&lt;/a&gt;&lt;/font&gt;&lt;font style="font-weight: normal"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=5ISAoyvxZkA:cddayNHFwJI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=5ISAoyvxZkA:cddayNHFwJI:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=5ISAoyvxZkA:cddayNHFwJI:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/5ISAoyvxZkA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/1466139310508253848/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2013/03/introduction-to-data-explorer-preview.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/1466139310508253848?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/1466139310508253848?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/5ISAoyvxZkA/introduction-to-data-explorer-preview.html" title="Introduction to Data Explorer Preview for Excel" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-mVEV-bri-xk/UTP9x9xo0KI/AAAAAAAAFhM/6pmbl0XHpEM/s72-c/image_thumb%25255B2%25255D.png?imgmax=800" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://www.sqljason.com/2013/03/introduction-to-data-explorer-preview.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUUEQ3c-cSp7ImA9WhBSGEU.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-2435691986651099507</id><published>2013-02-26T09:00:00.000-05:00</published><updated>2013-02-26T09:00:02.959-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-26T09:00:02.959-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SSRS" /><title>100% Visualization in SSRS</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Recently, Bill Jelen aka Mr Excel came up with a &lt;a title="Learn Excel 2013 &amp;ndash; &amp;ldquo;100% Visualization in Excel&amp;rdquo;: Podcast #1652" href="http://learnmrexcel.wordpress.com/2013/02/22/learn-excel-2013-100-visualization-in-excel-podcast-1652/" target="_blank"&gt;podcast&lt;/a&gt; that showcased a visualization that he termed as the “100% Visualization”. I have never seen this visualization before and I am not sure whether Stephen Few would approve of it. But I found the concept interesting and decided to exercise my grey cells by creating this in SSRS. Read on for the solution.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/--shmo_mFIh8/USwngBDcOXI/AAAAAAAAFdc/BAV18s2ktkY/s1600-h/image%25255B27%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="100% visualization in SSRS" border="0" alt="100% visualization in SSRS" src="http://lh4.ggpht.com/-vgQrDsy2y5I/USwngj6tlQI/AAAAAAAAFdk/kGoGQCSS7xU/image_thumb%25255B9%25255D.png?imgmax=800" width="447" height="251"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;1) Create a new report with a simple dataset having Category name and percentage value&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Bikes' AS Category, 82 AS Pc&lt;br&gt;UNION ALL&lt;br&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Accessories' AS Category, 49 AS Pc&lt;br&gt;UNION ALL&lt;br&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Textile' AS Category, 24 AS Pc&lt;br&gt;UNION ALL&lt;br&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Furniture' AS Category, 99 AS Pc&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-CrHvd__GpGE/USwnhM0TvZI/AAAAAAAAFds/46S1b2iiDgY/s1600-h/image%25255B2%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Dataset creation" border="0" alt="Dataset creation" src="http://lh4.ggpht.com/-2CPXPblO_K8/USwnhlelXVI/AAAAAAAAFd0/Mb499D2GXMA/image_thumb.png?imgmax=800" width="197" height="190"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;2) Make a simple tablix with 10 columns and 10 rows. Then fill the cell values from 1 to 100 as shown below&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-SWKAfaatObc/USwn1kk4dVI/AAAAAAAAFd8/TVWfhmz4yKk/s1600-h/image5.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Making the 10 * 10 matrix" border="0" alt="Making the 10 * 10 matrix" src="http://lh6.ggpht.com/-NoO75bcobtI/USwn2JBRW_I/AAAAAAAAFeE/yG7XrWzfNes/image_thumb1.png?imgmax=800" width="262" height="261"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;It is good to make all the cells of the same size and squares (for eg, size = 0.6,0.6)&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;3) Now make the border color as white, border style as solid, border width as 4pt and FontSize as 2pt.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-Mj3gquCNddE/USwn2m8sJwI/AAAAAAAAFeM/wNzbzjznpXY/s1600-h/image8.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="formatting the 10 * 10 matrix" border="0" alt="formatting the 10 * 10 matrix" src="http://lh6.ggpht.com/-50GGrgmNNrM/USwn23TiL2I/AAAAAAAAFeU/JrHEjPGAtzE/image_thumb2.png?imgmax=800" width="459" height="265"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;4) Add the custom code below &lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;Public Shared Function ColorDWB(ByVal Value As Decimal, ByVal MaxPositive As Decimal, ByVal Neutral As Decimal, ByVal ColStr As String) As String&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;Dim ColVar1 As Integer&lt;br&gt;Dim ColVar2 As Integer&lt;br&gt;Dim ColVar3 As Integer&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;&lt;font color="#008000"&gt;'Split the #RGB color to R, G, and B components&lt;/font&gt;&lt;br&gt;ColVar1=Convert.ToInt32(left(right(ColStr, 6),2),16)&lt;br&gt;ColVar2=Convert.ToInt32(left(right(ColStr, 4),2),16)&lt;br&gt;ColVar3=Convert.ToInt32(right(ColStr, 2),16)&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;&lt;font color="#008000"&gt;'Find Largest Range&lt;/font&gt;&lt;br&gt;Dim decPosRange As Decimal = Math.Abs(MaxPositive - Neutral)&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;&lt;font color="#008000"&gt;'Find appropriate color shade&lt;/font&gt;&lt;br&gt;Dim Shd As Decimal = 255&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;Dim iColor1 As Integer&lt;br&gt;Dim iColor2 As Integer&lt;br&gt;Dim iColor3 As Integer&lt;br&gt;Dim strColor As String&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;&lt;font color="#008000"&gt;'Reduce a shade for each of the R,G,B components&lt;br&gt;&lt;/font&gt;iColor1 = ColVar1 + CInt(Math.Round((MaxPositive-Value) * ((Shd - ColVar1) / decPosRange))) &lt;br&gt;iColor2 = ColVar2 + CInt(Math.Round((MaxPositive-Value) * ((Shd - ColVar2) / decPosRange)))&lt;br&gt;iColor3 = ColVar3 + CInt(Math.Round((MaxPositive-Value) * ((Shd - ColVar3) / decPosRange)))&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;&lt;font color="#008000"&gt;'Return the new color&lt;br&gt;&lt;/font&gt;strColor = "#" &amp;amp; iColor1.ToString("X2")&amp;nbsp; &amp;amp; iColor2.ToString("X2") &amp;amp; iColor3.ToString("X2")&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;Return strColor&lt;br&gt;End Function&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;br&gt;&lt;font color="#9b00d3" size="1"&gt;Private colorPalette As String() = { "#C85200", "#FF800E", "#5F9ED1", "#2CA02C", "#A59D93", "#B8341B", "#352F26", "#F1E7D6", "#E16C56", "#CFBA9B"}&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;Private count As Integer = 0&lt;br&gt;Private mapping As New System.Collections.Hashtable()&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;Public Function GetColor(ByVal groupingValue As String) As String&lt;br&gt;&amp;nbsp;&amp;nbsp; If mapping.ContainsKey(groupingValue) Then&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return mapping(groupingValue)&lt;br&gt;&amp;nbsp;&amp;nbsp; End If&lt;br&gt;&amp;nbsp;&amp;nbsp; Dim c As String = colorPalette(count Mod colorPalette.Length)&lt;br&gt;&amp;nbsp;&amp;nbsp; count = count + 1&lt;br&gt;&amp;nbsp;&amp;nbsp; mapping.Add(groupingValue, c)&lt;br&gt;&amp;nbsp;&amp;nbsp; Return c&lt;br&gt;End Function&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;The GetColor() is used to select new colors for each category type and the ColorDWB() is used to get a lighter shade of the selected color (you might recognize the ColorDWB function from my post on &lt;a title="Custom Code for Color Gradation in SSRS" href="http://www.sqljason.com/2013/02/custom-code-for-color-gradation-in-ssrs.html" target="_blank"&gt;Custom Code for Color Gradation in SSRS&lt;/a&gt;). &lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;5) Add the expression below for the Color and BackgroundColor property for all the cells.&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3" size="1"&gt;=iif(Me.Value &amp;lt;= Fields!Pc.Value, Code.GetColor(Fields!Category.Value), Code.ColorDWB(2, 10, 1, Code.GetColor(Fields!Category.Value))&amp;nbsp; )&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-DrHzeKHUpm0/USwn3WXxjWI/AAAAAAAAFec/_WGs1r8xX58/s1600-h/image11.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Adding color expressions" border="0" alt="Adding color expressions" src="http://lh6.ggpht.com/-1dpUs00yJrA/USwn3qkD_GI/AAAAAAAAFek/fo7S2ZI312A/image_thumb3.png?imgmax=800" width="504" height="181"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;6) Add a textbox on the top with the Category value, and a textbox below with the Pc field value and place all three objects inside a rectangle to keep them together. You can also format it by adding a background color of Green and a border of White, if needed.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-_OBKyElx6Ks/USwn4DR90PI/AAAAAAAAFes/3e5qCK4zIhI/s1600-h/image14.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Adding textboxes" border="0" alt="Adding textboxes" src="http://lh5.ggpht.com/-pAxuK-50yGY/USwn44ENdvI/AAAAAAAAFe0/FZnlPJJAUek/image_thumb4.png?imgmax=800" width="188" height="265"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;7) Now add a matrix with Category field on column group. Then, add the rectangle with the three objects inside the value field.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-5vMoIbLQuq4/USwn5JFqemI/AAAAAAAAFe8/Cp20g4YaOIs/s1600-h/image17.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Adding the parent matrix" border="0" alt="Adding the parent matrix" src="http://lh5.ggpht.com/-s4ar-NWQggY/USwn5pEen3I/AAAAAAAAFfE/NHuGczC_tlQ/image_thumb5.png?imgmax=800" width="414" height="265"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;Now you can delete the row and the column for the matrix so that it looks like shown below.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-ZHXvG6Wnddo/USwn53cvpPI/AAAAAAAAFfM/FjPn_5QdO9Y/s1600-h/image20.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="row and columns deleted" border="0" alt="row and columns deleted" src="http://lh3.ggpht.com/-aeuUc70Dw2Y/USwn6GquqMI/AAAAAAAAFfU/79hEVDqKlQk/image_thumb6.png?imgmax=800" width="195" height="265"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;8) Preview it to see the result.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-G65x_JK5qRI/USwn6iUM-OI/AAAAAAAAFfc/gU93WMovxKE/s1600-h/image23.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="End result" border="0" alt="End result" src="http://lh6.ggpht.com/-jYwjnt2Hzkw/USwn7CwxMyI/AAAAAAAAFfg/Q6-gqDRahdU/image_thumb7.png?imgmax=800" width="504" height="222"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Isn’t that pretty? And if there are more charts than what can be fitted in the horizontal way, you might want to check this &lt;strong&gt;&lt;u&gt;&lt;a title="Better way of repeating charts based on parameters" href="http://www.sqljason.com/2010/05/better-way-of-repeating-charts-based-on.html" target="_blank"&gt;post&lt;/a&gt;&lt;/u&gt;&lt;/strong&gt; on how to repeat it horizontally as well as vertically. As always, you can download the SQL 2012 rdl file from &lt;strong&gt;&lt;u&gt;&lt;a title="Download PercentChartViz.rdl" href="https://docs.google.com/file/d/0B1k6zmQ4NXQlYmR2WW9lV0JHVUE/edit?usp=sharing" target="_blank"&gt;here&lt;/a&gt;&lt;/u&gt;&lt;/strong&gt;.&lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=ALmNEa5ojOU:3IIsA6Xutow:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=ALmNEa5ojOU:3IIsA6Xutow:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=ALmNEa5ojOU:3IIsA6Xutow:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/ALmNEa5ojOU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/2435691986651099507/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2013/02/100-visualization-in-ssrs.html#comment-form" title="8 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/2435691986651099507?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/2435691986651099507?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/ALmNEa5ojOU/100-visualization-in-ssrs.html" title="100% Visualization in SSRS" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-vgQrDsy2y5I/USwngj6tlQI/AAAAAAAAFdk/kGoGQCSS7xU/s72-c/image_thumb%25255B9%25255D.png?imgmax=800" height="72" width="72" /><thr:total>8</thr:total><feedburner:origLink>http://www.sqljason.com/2013/02/100-visualization-in-ssrs.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUEDRXs4fyp7ImA9WhBSEkU.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-3419837170395744916</id><published>2013-02-19T10:27:00.001-05:00</published><updated>2013-02-19T10:27:54.537-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-19T10:27:54.537-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SSRS" /><title>Bandlines in SSRS</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Sometime in January, visualization expert Stephen Few expanded on Tufte’s idea of Sparklines and came up with this new visualization called Bandlines. Bandlines use horizontal bands of color in the background of the plot area to display information about the distribution of values and you can read a detailed description on bandlines in Stephen’s &lt;a title="Introducing Bandlines - Sparklines Enriched with Information about Magnitude and Distribution" href="http://www.perceptualedge.com/articles/visual_business_intelligence/introducing_bandlines.pdf" target="_blank"&gt;article&lt;/a&gt;. Companies like &lt;a title="Bandlines in XLCubed" href="http://blog.xlcubed.com/2013/01/bandlines-in-xlcubed/" target="_blank"&gt;XLCubed&lt;/a&gt; have already started integrating this within their products and it was only a matter of time before yours truly tried to replicate the same within SSRS. Read on for the solution.&lt;/font&gt;&lt;/p&gt; &lt;p align="left"&gt;&lt;a href="http://lh5.ggpht.com/-rdah5mWum3E/USOZiZ6MiCI/AAAAAAAAFY0/o4rUQlBerlw/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="Bandlines in SSRS" border="0" alt="Bandlines in SSRS" src="http://lh6.ggpht.com/-M65CbVd-aXA/USOZkXFR-mI/AAAAAAAAFY8/jEU3MARw9Uw/image_thumb%25255B5%25255D.png?imgmax=800" width="485" height="173"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;One of the most important steps to reproduce this in SSRS is to find the percentiles (25&lt;sup&gt;th&lt;/sup&gt; and 75&lt;sup&gt;th&lt;/sup&gt;) in your dataset query. You can do it the hard way by coming up with the logic and then computing it within your dataset. I chose not to reinvent the wheel and used &lt;a href="http://richmintzbi.wordpress.com/" target="_blank"&gt;Richard Mintz’s&lt;/a&gt; (yes, the same guy who came up with the code behind &lt;a title="Heat Maps for SSRS using Map Control" href="http://www.sqljason.com/2012/03/heat-maps-for-ssrs-using-map-control.html" target="_blank"&gt;Squarified Heatmaps in SSRS&lt;/a&gt;) SSAS stored procedure for the same. He has written an excellent post on &lt;a title="Percentiles like Excel to the 4th power (T-SQL, SQL CLR, MDX, ASSP)" href="http://richmintzbi.wordpress.com/tag/ssas-stored-procedure-percentiles/" target="_blank"&gt;how to compute percentiles in both SQL and MDX&lt;/a&gt;, so you can use his code depending on whether your source is a relational database or a multidimensional cube. For this demo, my source would be the AdventureWorks multidimensional cube. Follow the steps below to reproduce bandlines:-&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;1) Download the dll from &lt;a title="Download SSAS StoredProcedures.dll" href="http://sdrv.ms/MeFtkS" target="_blank"&gt;here&lt;/a&gt; and add it to your SSAS instance as per the instructions at the end of Richard’s &lt;a title="Percentiles like Excel to the 4th power (T-SQL, SQL CLR, MDX, ASSP)" href="http://richmintzbi.wordpress.com/2012/06/07/percentiles-like-excel-to-the-4th-power-t-sql-sql-clr-mdx-assp/" target="_blank"&gt;post&lt;/a&gt;. I have named the assembly as SPPercentile.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-d9znSaKjNVo/USOZk-J3SKI/AAAAAAAAFZE/jJBh9czhErA/s1600-h/SNAGHTMLc8a22ec%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Adding assembly" border="0" alt="Adding assembly" src="http://lh6.ggpht.com/-Cl2Q-ILceRA/USOZl46XjkI/AAAAAAAAFZM/hW1wYDovi4g/SNAGHTMLc8a22ec_thumb.png?imgmax=800" width="339" height="185"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;2) Make a dataset query which will show the Internet Sales amount for a product category and month with the year as a parameter (optional, dataset query for year parameter is not shown here). Also make 2 calculated measures which will show the maximum and minimum values for internet sales by category across the months.&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;WITH MEMBER measures.[maxP] AS&lt;br&gt;Max (&lt;br&gt;StrToSet ( @DateCalendarYear ) * [Product].[Category].CurrentMember * [Date].[Month Name].[All] * [Date].[Calendar].[Month].AllMembers,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Measures].[Internet Sales Amount]&lt;br&gt;&amp;nbsp; )&lt;br&gt;MEMBER measures.[minP] AS&lt;br&gt;Min (&lt;br&gt;StrToSet ( @DateCalendarYear ) * [Product].[Category].CurrentMember * [Date].[Month Name].[All] * [Date].[Calendar].[Month].AllMembers,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Measures].[Internet Sales Amount]&lt;br&gt;&amp;nbsp; )&lt;br&gt;SELECT NON EMPTY&lt;br&gt;{ [Measures].[Internet Sales Amount], measures.[maxP], measures.[minP] } ON COLUMNS,&lt;br&gt;{&lt;br&gt;NonEmpty ( [Date].[Month Name].Children, [Measures].[Internet Sales Amount] ) * [Product].[Category].[Category].AllMembers&lt;br&gt;} ON ROWS&lt;br&gt;FROM [Adventure Works]&lt;br&gt;WHERE StrToSet (&lt;br&gt;&amp;nbsp; @DateCalendarYear&lt;br&gt;)&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-MZLdKpkW7Tg/USOZm1MZi5I/AAAAAAAAFZU/FxxmSO4p2aE/s1600-h/image%25255B8%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="Max and min stay same for categories" border="0" alt="Max and min stay same for categories" src="http://lh3.ggpht.com/-s5pdCBxRDLA/USOZopE5d2I/AAAAAAAAFZc/R-RA_uUQUrQ/image_thumb%25255B7%25255D.png?imgmax=800" width="504" height="283"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Note that the maximum / minimum will be the same for a category across all months. This is required for doing the scaling of the bandlines, and will be explained in a later step.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;3) Make a dataset query for getting the 75th and 25th percentiles.&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;WITH MEMBER measures.[25th percentile] AS&lt;br&gt;[SPPercentile].ValueAtPercentile ( NonEmpty (&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( StrToSet ( @DateCalendarYear ) * [Date].[Calendar].[Month].AllMembers * [Product].[Category].Children,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Measures].[Internet Sales Amount] )&lt;br&gt;&amp;nbsp; ),&lt;br&gt;&amp;nbsp; [Measures].[Internet Sales Amount],&lt;br&gt;&amp;nbsp; .25,&lt;br&gt;TRUE,&lt;br&gt;"INC" )&lt;br&gt;MEMBER measures.[75th percentile] AS&lt;br&gt;[SPPercentile].ValueAtPercentile ( NonEmpty (&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( StrToSet ( @DateCalendarYear ) * [Date].[Calendar].[Month].AllMembers * [Product].[Category].Children,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Measures].[Internet Sales Amount] )&lt;br&gt;&amp;nbsp; ),&lt;br&gt;&amp;nbsp; [Measures].[Internet Sales Amount],&lt;br&gt;&amp;nbsp; .75,&lt;br&gt;TRUE,&lt;br&gt;"INC" )&lt;br&gt;SELECT NON EMPTY&lt;br&gt;{ measures.[25th percentile], measures.[75th percentile] } ON COLUMNS&lt;br&gt;FROM [Adventure Works]&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-W2oyqC3ADZ4/USOZqnEc-fI/AAAAAAAAFZk/YS5a6RLQ0-A/s1600-h/image%25255B11%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="Getting 25 and 75 percentile" border="0" alt="Getting 25 and 75 percentile" src="http://lh6.ggpht.com/-7eV5AfuiTp4/USOZs64j04I/AAAAAAAAFZs/L7VWLu5rJlo/image_thumb%25255B8%25255D.png?imgmax=800" width="504" height="260"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;Note that we are using the [SPPercentile].ValueAtPercentile() stored procedure and you can find the syntax in Richard’s &lt;a title="Percentiles like Excel to the 4th power (T-SQL, SQL CLR, MDX, ASSP)" href="http://richmintzbi.wordpress.com/2012/06/07/percentiles-like-excel-to-the-4th-power-t-sql-sql-clr-mdx-assp/" target="_blank"&gt;post&lt;/a&gt;. Now we should be having the following three datasets.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-wwRUKYWtDDI/USOZtXQ-o0I/AAAAAAAAFZ0/iS6TmdW0ddI/s1600-h/image%25255B14%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Datasets" border="0" alt="Datasets" src="http://lh3.ggpht.com/-PFVXixQJ4Uo/USOZuZf-BRI/AAAAAAAAFZ8/0rkKSOJ1Mm0/image_thumb%25255B9%25255D.png?imgmax=800" width="199" height="265"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;4) Now that we have found out the percentiles, store their values in two hidden report parameters respectively – PC25 and PC75. Make sure that that the available values and default values are obtained from the corresponding field in DST_Percentile dataset as shown below.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-NboKmbhmgaU/USOZv31lsSI/AAAAAAAAFaE/i9gvBSmp2V8/s1600-h/image%25255B18%25255D.png"&gt;&lt;font color="#000000"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Report parameter properties for PC25 and PC75" border="0" alt="Report parameter properties for PC25 and PC75" src="http://lh5.ggpht.com/-7GMP2ibAKUU/USOZxGxdZWI/AAAAAAAAFaM/4bQCSwb19c8/image_thumb%25255B11%25255D.png?imgmax=800" width="604" height="249"&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;5) Now drag and drop a matrix into the layout. Use the Categories on the rows and drag and drop a line chart to the values as shown below. In the chart, use Internet Sales Amount as the Values, Month Name as the category group and Category as the Series Group.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-0nNDBK8gTYI/USOZyKalFUI/AAAAAAAAFaU/PneB1USGVXA/s1600-h/image%25255B21%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Getting the chart inside matrix" border="0" alt="Getting the chart inside matrix" src="http://lh4.ggpht.com/-4qcNgamv4aE/USOZy3bxldI/AAAAAAAAFac/0JZ3_KBCop0/image_thumb%25255B12%25255D.png?imgmax=800" width="504" height="262"&gt;&lt;/a&gt;&lt;/p&gt;   &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;6) Make the max and min of the vertical axis as the maxP and minP fields. This will help in scaling the sparkline (yes, by now we have got the basic structure of a sparkline).&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/--uXP49xH2vc/USOZzxACUBI/AAAAAAAAFak/YHhl_jO5EoU/s1600-h/image%25255B25%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Scaling the chart" border="0" alt="Scaling the chart" src="http://lh6.ggpht.com/-CMjach1slAw/USOZ1ILuEFI/AAAAAAAAFas/GKkUXQe4Bmc/image_thumb%25255B14%25255D.png?imgmax=800" width="404" height="437"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Also, remove the vertical axis, horizontal axis, legend and all other titles.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;7) Add a value to the chart with the expression below.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3" size="2"&gt;=iif(Fields!maxP.Value &amp;lt;= Parameters!PC75.Value, Nothing, Fields!maxP.Value)&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Make the chart type as Area Chart and color as #f5f5f5&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-TGnLzLF45Eo/USOZ1oZuh4I/AAAAAAAAFa0/DM3b8W3AOfg/s1600-h/image%25255B28%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Adding the 75-100 percentile band" border="0" alt="Adding the 75-100 percentile band" src="http://lh3.ggpht.com/-NWlwkZeuwPY/USOZ2guh0lI/AAAAAAAAFa8/8OArNSuJc5w/image_thumb%25255B15%25255D.png?imgmax=800" width="504" height="170"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;This will act as the band for the values between 75 and 100 percentile, so ensure it is at the very top as shown in the picture above. If the max value for the category is lesser than the PC75, we don’t want to show this band.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;8) Add another value to the chart with the expression below&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3" size="2"&gt;=iif(Fields!maxP.Value &amp;gt;=Parameters!PC75.Value, Parameters!PC75.Value, Fields!maxP.Value)&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Make the chart type as Area Chart and color as #d7d7d7&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-_LmNEZbTUoo/USOZ3Xq_0lI/AAAAAAAAFbE/yQpQfB-Bm20/s1600-h/image%25255B37%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Adding the 25-75 percentile band" border="0" alt="Adding the 25-75 percentile band" src="http://lh4.ggpht.com/-aMwtgmOMLBo/USOZ4T1XgJI/AAAAAAAAFbM/BZKe_WmKoB8/image_thumb%25255B18%25255D.png?imgmax=800" width="504" height="178"&gt;&lt;/a&gt;&lt;/p&gt;   &lt;p&gt;&lt;font color="#000000" size="2"&gt;This will act as the band between 25 and 75 percentile and should be appearing on top of the 75-100 band, so ensure that it appears just under the previous value as shown in the picture above. &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;9) Add the last band by adding the expression below&lt;/font&gt;&lt;/p&gt; &lt;p align="left"&gt;&lt;font color="#9b00d3" size="2"&gt;=iif(Fields!maxP.Value &amp;lt;= Parameters!PC25.Value, Fields!maxP.Value, iif(Fields!minP.Value&amp;gt;=Parameters!PC25.Value, Nothing, Parameters!PC25.Value))&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;Make the chart type as Area Chart and color as #adadad&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-_ppJBhBxFMo/USOZ5kYZjHI/AAAAAAAAFbU/J6KJKZa-8Qo/s1600-h/image%25255B43%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Adding the 0-25 percentile band" border="0" alt="Adding the 0-25 percentile band" src="http://lh6.ggpht.com/-lH2SQhZ-0QM/USOZ6s4YryI/AAAAAAAAFbc/qGP2aQrVua0/image_thumb%25255B20%25255D.png?imgmax=800" width="504" height="207"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Again ensure that this value appears just under the previous one, as shown in the picture above.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;10) Now, we can preview it and see the results.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-0Ifmr9EpZM4/USOZ7eTByXI/AAAAAAAAFbk/E6QXvrQwt7c/s1600-h/image%25255B47%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Preview the results" border="0" alt="Preview the results" src="http://lh3.ggpht.com/-B_cxxvPAMhw/USOZ8tZZC1I/AAAAAAAAFbs/0pV__zCjj38/image_thumb%25255B22%25255D.png?imgmax=800" width="304" height="304"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;From the markers, you can also note that there are 24 values. Out of that, there are 6 values in the 75-100 band, 12 values in the 25-75 band and 6 in the 0-25 band. So the percentiles are indeed working! And very quickly, you can make out that Bikes have more of their values in the 75-100 percentile, an extra bit of information that you wouldn’t have got with sparklines. That is the power f Bandlines.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;11) Now with a bit of formatting, this is the final end result and you can download the completed report rdl (SSRS 2012) from &lt;strong&gt;&lt;a title="Download Bandlines.rdl" href="https://docs.google.com/file/d/0B1k6zmQ4NXQlbjFhMnV5YkdyT2c/edit?usp=sharing" target="_blank"&gt;here&lt;/a&gt;&lt;/strong&gt;.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-USkd19VwmQI/USOZ9eqs55I/AAAAAAAAFb0/dIvLOKBaxbY/s1600-h/image%25255B51%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="The formatted bandline in ssrs" border="0" alt="The formatted bandline in ssrs" src="http://lh3.ggpht.com/-6WGdBSXVCZ8/USOZ-P5nFkI/AAAAAAAAFb8/IRcpNVc7Xi4/image_thumb%25255B24%25255D.png?imgmax=800" width="404" height="284"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=UkjZJviH6sU:yJVQLAOfUAg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=UkjZJviH6sU:yJVQLAOfUAg:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=UkjZJviH6sU:yJVQLAOfUAg:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/UkjZJviH6sU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/3419837170395744916/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2013/02/bandlines-in-ssrs.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/3419837170395744916?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/3419837170395744916?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/UkjZJviH6sU/bandlines-in-ssrs.html" title="Bandlines in SSRS" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-M65CbVd-aXA/USOZkXFR-mI/AAAAAAAAFY8/jEU3MARw9Uw/s72-c/image_thumb%25255B5%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.sqljason.com/2013/02/bandlines-in-ssrs.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EDQX86eip7ImA9WhBSGEk.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-9135575288151932808</id><published>2013-02-12T16:18:00.001-05:00</published><updated>2013-02-25T21:27:50.112-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-25T21:27:50.112-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SSRS" /><title>Custom Code for Color Gradation in SSRS</title><content type="html">&lt;p align="justify"&gt;&lt;font size="2"&gt;Throughout my career as a Business Intelligence Consultant, I have met and interacted with a lot of DBAs. One thing (among many others) I particularly admire about them is that they have their own list of SQL scripts that they carry with them from job to job (and my observation is that the list usually grows with experience). This way, they don’t have to remember all of them, but when the need arises, they have the scripts at their fingertips. The only thing I have close to that is my list of custom codes for doing some specific operations in SSRS. One of my most frequently used scripts originates from this &lt;a title="SQL Reporting &amp;quot;How to&amp;quot; - Conditional Color 1/4: The Basics. Report Expressions &amp;amp; Custom Code" href="http://blogs.msdn.com/b/davidlean/archive/2009/02/17/sql-reporting-how-to-conditional-color-1-4-the-basics-report-expressions-custom-code.aspx" target="_blank"&gt;series of posts&lt;/a&gt; on how to conditionally color in SSRS. Based on my needs, I had tweaked the code such that it will display the color gradation to white for any input color. Thought that this might come in handy for some of you guys.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;a href="http://lh4.ggpht.com/-P9L6ohi2yGI/URqxYrZjO1I/AAAAAAAAFVw/5IH0SQ7X_cA/s1600-h/image%25255B5%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="Custom code for Color gradation in SSRS" border="0" alt="Custom code for Color gradation in SSRS" src="http://lh5.ggpht.com/-g6lRIYtDHio/URqxaYWBqNI/AAAAAAAAFV4/OGU_UOyUujk/image_thumb%25255B3%25255D.png?imgmax=800" width="400" height="228"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="2"&gt;Code&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;Public Shared Function ColorDWB(ByVal Value As Decimal, ByVal MaxPositive As Decimal, ByVal Neutral As Decimal, ByVal ColStr As String) As String&lt;br&gt;Dim ColVar1 As Integer&lt;br&gt;Dim ColVar2 As Integer&lt;br&gt;Dim ColVar3 As Integer&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;&lt;font color="#008000"&gt;'Split the #RGB color to R, G, and B components&lt;/font&gt;&lt;br&gt;ColVar1=Convert.ToInt32(left(right(ColStr, 6),2),16)&lt;br&gt;ColVar2=Convert.ToInt32(left(right(ColStr, 4),2),16)&lt;br&gt;ColVar3=Convert.ToInt32(right(ColStr, 2),16)&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;&lt;font color="#008000"&gt;'Find Largest Range&lt;/font&gt;&lt;br&gt;Dim decPosRange As Decimal = Math.Abs(MaxPositive - Neutral)&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;&lt;font color="#008000"&gt;'Find appropriate color shade&lt;/font&gt;&lt;br&gt;Dim Shd As Decimal = 255&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;Dim iColor1 As Integer&lt;br&gt;Dim iColor2 As Integer&lt;br&gt;Dim iColor3 As Integer&lt;br&gt;Dim strColor As String&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;&lt;font color="#008000"&gt;'Reduce a shade for each of the R,G,B components&lt;/font&gt;&lt;br&gt;iColor1 = ColVar1 + CInt(Math.Round((MaxPositive-Value) * ((Shd - ColVar1) / decPosRange))) &lt;br&gt;iColor2 = ColVar2 + CInt(Math.Round((MaxPositive-Value) * ((Shd - ColVar2) / decPosRange)))&lt;br&gt;iColor3 = ColVar3 + CInt(Math.Round((MaxPositive-Value) * ((Shd - ColVar3) / decPosRange)))&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;&lt;font color="#008000"&gt;'Return the new color&lt;/font&gt;&lt;br&gt;strColor = "#" &amp;amp; iColor1.ToString("X2")&amp;nbsp; &amp;amp; iColor2.ToString("X2") &amp;amp; iColor3.ToString("X2")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;Return strColor&lt;br&gt;End Function&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;&lt;u&gt;How To Use&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;1) Lets say we have a simple report which shows the sales by vehicle type and month&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-jFQcvUmAIVw/URqxbmhv4jI/AAAAAAAAFWA/AGDPVhsvv58/s1600-h/image%25255B9%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="report" border="0" alt="report" src="http://lh5.ggpht.com/-nc2UaJY2D00/URqxcvpEt9I/AAAAAAAAFWI/1nHmOSv-OAI/image_thumb%25255B5%25255D.png?imgmax=800" width="504" height="258"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;2)&amp;nbsp; You can either compile this code and use it in your report or just paste it in the code tab of the Report Properties. If we just need to get different shades of a color (say #2322EE), we can just use the expression below as the BackgroundColor property of the cell.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;=Code.ColorDWB(sum(Fields!Sales.Value), Max(Fields!Sales.Value, "DataSet1"), Min(Fields!Sales.Value, "DataSet1"), "#2322EE")&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-YzyhwnmJ-ak/URqxdXk1HBI/AAAAAAAAFWQ/wvxksUa4V7k/s1600-h/image%25255B13%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Color gradation across entire table" border="0" alt="Color gradation across entire table" src="http://lh3.ggpht.com/-9zfAdsGHouI/URqxeU23zzI/AAAAAAAAFWY/JFs_--jM64g/image_thumb%25255B7%25255D.png?imgmax=800" width="504" height="121"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;3) If you need the color gradation to be based on each row, then make sure that the max and min values are passed for the row (in this case, the Vehicle group) rather than the whole dataset.&lt;/font&gt;&lt;/p&gt; &lt;p align="left"&gt;&lt;font color="#9b00d3" size="1"&gt;=Code.ColorDWB(sum(Fields!Sales.Value), Max(Fields!Sales.Value, "Vehicle"), Min(Fields!Sales.Value, "Vehicle"), "#2322EE")&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-AZEg35vysG0/URqxfLTB93I/AAAAAAAAFWg/iI9ku0yg2tc/s1600-h/image%25255B17%25255D.png"&gt;&lt;font color="#9b00d3" size="1"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Color gradation across each row in table" border="0" alt="Color gradation across each row in table" src="http://lh3.ggpht.com/-w9dKmEL4WYg/URqxgN9E4UI/AAAAAAAAFWo/aTMgT7RYVsY/image_thumb%25255B9%25255D.png?imgmax=800" width="504" height="121"&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;4) If you need different colors for your vehicle, you can make use of the &lt;a title="Specify Consistent Colors across Multiple Shape Charts (Report Builder and SSRS)" href="http://technet.microsoft.com/en-us/library/dd239350.aspx" target="_blank"&gt;GetColor() custom code&lt;/a&gt; and then pass that in your expression:-&lt;/font&gt;&lt;/p&gt; &lt;p align="left"&gt;&lt;font color="#9b00d3" size="1"&gt;=Code.ColorDWB(sum(Fields!Sales.Value), Max(Fields!Sales.Value, "Vehicle"), Min(Fields!Sales.Value, "Vehicle"), Code.GetColor(Fields!Vehicle.Value))&lt;/font&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-u-GwNXrfwiQ/URqxgsChBkI/AAAAAAAAFWw/TkTkoFKZ6WY/s1600-h/image%25255B21%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Color gradation across each row in table with different color" border="0" alt="Color gradation across each row in table with different color" src="http://lh6.ggpht.com/-ShsYddk8s2w/URqxhioZjFI/AAAAAAAAFW4/ABRBuDkk-Ko/image_thumb%25255B11%25255D.png?imgmax=800" width="504" height="119"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Just make sure that the colors in the palette are using the hex values and not just strings like “Red”.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-6mqRkB6ZD6k/URqxipYjxcI/AAAAAAAAFXA/HOert8PrBpc/s1600-h/image%25255B25%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Make sure colors are hex values and not strings in the palette" border="0" alt="Make sure colors are hex values and not strings in the palette" src="http://lh5.ggpht.com/-yjb7GNeLULA/URqxjyIzsLI/AAAAAAAAFXI/0Gu8XAZdDxM/image_thumb%25255B13%25255D.png?imgmax=800" width="404" height="312"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;5) You can also use this code to go across two colors. For eg, what if we want to go from Blue to White to Orange such that the mean is white, more is blue and less is orange? We can write an expression as shown below&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;=iif(&lt;font color="#0000ff"&gt;sum(Fields!Sales.Value) &amp;gt;= (Max(Fields!Sales.Value, "DataSet1") + Min(Fields!Sales.Value, "DataSet1"))/2&lt;/font&gt;,&lt;br&gt;&lt;font color="#c0504d"&gt;Code.ColorDWB(sum(Fields!Sales.Value), Max(Fields!Sales.Value, "DataSet1"), (Max(Fields!Sales.Value, "DataSet1") + Min(Fields!Sales.Value, "DataSet1"))/2, "#6495ED")&lt;/font&gt;,&lt;br&gt;&lt;font color="#008000"&gt;Code.ColorDWB(-sum(Fields!Sales.Value), -Min(Fields!Sales.Value, "DataSet1"), -(Max(Fields!Sales.Value, "DataSet1") + Min(Fields!Sales.Value, "DataSet1"))/2, "#FFC125")&lt;/font&gt;)&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Note that we are writing a conditional expression to see if the current field is more than the mean (max+min / 2). If yes, then we use the familiar expression with the Blue color (so more the value, darker the blue). If no, we need to do add a negative for all the fields so that the coloring happens in the reverse order (lesser the number, darker the Orange).&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-pBhQSgJ-CyA/URqxk83-hvI/AAAAAAAAFXQ/D0ZKzLF8cMs/s1600-h/image%25255B29%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Blue to Orange color gradation across entire table" border="0" alt="Blue to Orange color gradation across entire table" src="http://lh3.ggpht.com/-yRdZPrKjg40/URqxl6lhmII/AAAAAAAAFXY/Ht8ai0iTlLI/image_thumb%25255B15%25255D.png?imgmax=800" width="504" height="121"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;You can keep on tweaking this code and use it for a wide variety of visualizations. I am no VB.NET developer, so it is possible that there is a much better way to do the same. If you do know of any better technique, do post in the comments so that others can benefit from it.&lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=gh95R86dW4w:KgTx5h8AALU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=gh95R86dW4w:KgTx5h8AALU:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=gh95R86dW4w:KgTx5h8AALU:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/gh95R86dW4w" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/9135575288151932808/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2013/02/custom-code-for-color-gradation-in-ssrs.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/9135575288151932808?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/9135575288151932808?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/gh95R86dW4w/custom-code-for-color-gradation-in-ssrs.html" title="Custom Code for Color Gradation in SSRS" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-g6lRIYtDHio/URqxaYWBqNI/AAAAAAAAFV4/OGU_UOyUujk/s72-c/image_thumb%25255B3%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.sqljason.com/2013/02/custom-code-for-color-gradation-in-ssrs.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEMFQ3o7eip7ImA9WhNaGUU.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-7211250939883917223</id><published>2013-02-04T09:00:00.000-05:00</published><updated>2013-02-04T09:00:12.402-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-04T09:00:12.402-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PowerPivot" /><category scheme="http://www.blogger.com/atom/ns#" term="DAX" /><title>UNION Operation in DAX Queries</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;In one of my previous posts - &lt;a title="Row Selection Using Slicers in PowerPivot - Part 1" href="http://www.sqljason.com/2013/01/row-selection-using-slicers-in.html" target="_blank"&gt;Row Selection Using Slicers in PowerPivot - Part 1&lt;/a&gt;, I had demonstrated the use of what Marco Russo defined as &lt;a title="Linkback Tables in PowerPivot for Excel 2013" href="http://www.sqlbi.com/articles/linkback-tables-in-powerpivot-for-excel-2013/" target="_blank"&gt;Reverse Linked Tables and Linkback table&lt;/a&gt;s. A particularly eye-catching thing in my post was the use of Microsoft Query instead of DAX Query to obtain the required reverse-linked table and one of the reasons I gave was that it was difficult to do an UNION operation using DAX queries (yes, you heard it right. I said difficult and not impossible). Well, since difficult is such a subjective word, I decided to jot down the technique, maybe it might seem easy for you guys!&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-JdySHnPjP-c/UQ8V3C4R9rI/AAAAAAAAFSQ/uDfWzdcgwxU/s1600-h/image%25255B3%25255D.png"&gt;&lt;font color="#000000" size="2"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="Union operation with DAX queries / PowerPivot" border="0" alt="Union operation with DAX queries / PowerPivot" src="http://lh4.ggpht.com/-b9PUT2QTsx8/UQ8V3vFmWdI/AAAAAAAAFSY/dsVQ7QoeWx4/image_thumb%25255B1%25255D.png?imgmax=800" width="369" height="256"&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;For the purpose of this demonstration, I am using two tables having identical structures. There are just two columns in the tables - country and state and we need to do an UNION operation on these two tables.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-d7JQO593E5k/UQ8V4JaUBLI/AAAAAAAAFSg/dGUtIPxCM1w/s1600-h/image%25255B6%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Source" border="0" alt="Source" src="http://lh6.ggpht.com/-SB9xmdFwAZQ/UQ8V4tVsAsI/AAAAAAAAFSo/h3ztHbPs2-E/image_thumb%25255B2%25255D.png?imgmax=800" width="486" height="154"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;The result should be 7 rows as shown below&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-PKHBgxYws2M/UQ8V5Dn0IyI/AAAAAAAAFSw/lgkE5GH8RvE/s1600-h/image%25255B12%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Expected Result" border="0" alt="Expected Result" src="http://lh4.ggpht.com/-K5Q-sm5exUk/UQ8V5g0Kl3I/AAAAAAAAFS4/phaxxRtI_Yg/image_thumb%25255B4%25255D.png?imgmax=800" width="168" height="171"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Follow the steps below for the solution:-&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;1) Import the two tables to PowerPivot (you can also use this technique on a SSAS tabular model). I will be using &lt;a title="DAX Studio" href="http://daxstudio.codeplex.com/" target="_blank"&gt;DAX Studio&lt;/a&gt; for writing my queries and displaying the results (though you might as well as use this in SSMS or in the DMX query editor for SSRS depending on your purpose).&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;2) The first thing to understand here is that DAX, as a query language, can not add rows usually, and UNION requires that we get more rows (since it is the combined result of both the tables). &lt;u&gt;However, there is an operator in DAX which generally generates more rows than its source tables – &lt;strong&gt;CROSSJOIN&lt;/strong&gt;&lt;/u&gt; (except when any one of the participating tables has only one row). So let’s first crossjoin the two tables and see the results.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-po6JTSj-C4s/UQ8V6SZxPoI/AAAAAAAAFTA/GSXp0bi1H1g/s1600-h/image%25255B9%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="CrossJoin" border="0" alt="CrossJoin" src="http://lh4.ggpht.com/-f-U9e8icDOM/UQ8V618tRLI/AAAAAAAAFTI/oXSkCc_7u3s/image_thumb%25255B3%25255D.png?imgmax=800" width="435" height="265"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Now you can see that we get 12 rows, however no single column gives the result that we need. Somehow, we need to get a logic to &lt;u&gt;filter the 5 rows&lt;/u&gt; and also a logic to &lt;u&gt;combine the right results in one calculated column&lt;/u&gt;.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;3) To identify the individual rows, let us add a rank column to each of the two tables and then crossjoin them.&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;EVALUATE&lt;br&gt;CROSSJOIN (&lt;br&gt;ADDCOLUMNS (Table1,"Rnk1",RANKX ( Table1, Table1[State],, 1, DENSE )&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;br&gt;ADDCOLUMNS (Table2,"Rnk2",RANKX ( Table2, Table2[State],, 1, DENSE )&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;br&gt;&amp;nbsp; )&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-bGC5efZH8PQ/UQ8V7VidATI/AAAAAAAAFTQ/86n9AAt0UeE/s1600-h/image%25255B15%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Adding rank identifiers to the table rows" border="0" alt="Adding rank identifiers to the table rows" src="http://lh3.ggpht.com/-odJ0fygJ5Kc/UQ8V72CQ3pI/AAAAAAAAFTY/vqHU0mPRkcE/image_thumb%25255B5%25255D.png?imgmax=800" width="504" height="261"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;4) When I looked at this resultset initially, I felt that I could just filter all rows having Rank1 = 1 and Rank2 = 2 and then add a calculated column each for Country and State such that if Rank1 = 1, then the value comes from Table2 else it comes from Table1.&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;EVALUATE&lt;br&gt;&lt;font color="#008000"&gt;ADDCOLUMNS (&lt;br&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;FILTER (&lt;br&gt;&lt;/font&gt;CROSSJOIN (&lt;br&gt;ADDCOLUMNS (Table1,"Rnk1",RANKX ( Table1, Table1[State],, 1, DENSE )&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;br&gt;ADDCOLUMNS (Table2,"Rnk2",RANKX ( Table2, Table2[State],, 1, DENSE )&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;[Rnk1] = 1 || [Rnk2] = 2&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/font&gt;,&lt;br&gt;&lt;font color="#008000"&gt;"UnionCntry", IF ( [Rnk1] = 1, Table2[Country], Table1[Country] ),&lt;br&gt;"UnionState", IF ( [Rnk1] = 1, Table2[State], Table1[State] )&lt;br&gt;&amp;nbsp; )&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-G_2w6zrKdKo/UQ8V8eXPOII/AAAAAAAAFTg/A8dpRvDKm9I/s1600-h/image%25255B21%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Incorrect logic" border="0" alt="Incorrect logic" src="http://lh4.ggpht.com/-9nya-7wuN0E/UQ8V8wY1gDI/AAAAAAAAFTo/BZ4MtAQhhUg/image_thumb%25255B7%25255D.png?imgmax=800" width="504" height="197"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Even though the UnionCntry and UnionState columns might appear right, they are &lt;strong&gt;not&lt;/strong&gt;, as one row is missing (in this case, the row with IN country and KL state). This happens because there will always be one row which has Rnk1 = 1 and Rnk2 = 2, and hence there is an overlap. So we need to think of a different technique to filter the rows.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;5) Since we are short of one row, we need to include one more extra row having the complementary values of ranks for the overlapping row (in this case, the row with Rnk1=2 and Rnk2=1). This can be done by using the query given below.&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;EVALUATE&lt;br&gt;FILTER(&lt;br&gt;CROSSJOIN (&lt;br&gt;ADDCOLUMNS (Table1,"Rnk1",RANKX ( Table1, Table1[State],, 1, DENSE )&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;br&gt;ADDCOLUMNS (Table2,"Rnk2",RANKX ( Table2, Table2[State],, 1, DENSE )&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;br&gt;&amp;nbsp; ), ([Rnk1]=1 || [Rnk2]=2) &lt;font color="#0000ff"&gt;|| ([Rnk1]=2 &amp;amp;&amp;amp; [Rnk2]=1)&lt;/font&gt;)&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-42Sr6uGSVaY/UQ8V9eIkgEI/AAAAAAAAFTw/NK5kDx1AFo8/s1600-h/image%25255B24%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Filtering the right number of rows" border="0" alt="Filtering the right number of rows" src="http://lh5.ggpht.com/-9B0UgD6RN2c/UQ8V9weKh5I/AAAAAAAAFT4/j-1m_6dg47U/image_thumb%25255B8%25255D.png?imgmax=800" width="504" height="240"&gt;&lt;/a&gt;&lt;/p&gt;   &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;6) Now all we have to do is to get the logic for creating the calculated columns. We can do it with the help of a SWITCH statement by (a) assigning the extra row (Rnk1=2 and Rnk2=1) to Table1 and (b) making sure that the overlapping row (Rnk1=1 and Rnk2=2) is assigned to Table2. This can be done by the following query&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;EVALUATE&lt;br&gt;ADDCOLUMNS(&lt;br&gt;FILTER(&lt;br&gt;CROSSJOIN (&lt;br&gt;ADDCOLUMNS (Table1,"Rnk1",RANKX ( Table1, Table1[State],, 1, DENSE )&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;br&gt;ADDCOLUMNS (Table2,"Rnk2",RANKX ( Table2, Table2[State],, 1, DENSE )&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;br&gt;&amp;nbsp; ), ([Rnk1]=1 || [Rnk2]=2) || ([Rnk1]=2 &amp;amp;&amp;amp; [Rnk2]=1))&lt;br&gt;, "UnionCountry", &lt;font color="#0000ff"&gt;SWITCH(TRUE, &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ([Rnk2]=2 &amp;amp;&amp;amp; [Rnk1]&amp;lt;&amp;gt;1) || ([Rnk2]=1 &amp;amp;&amp;amp; [Rnk1]=1)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,Table1[Country], Table2[Country])&lt;br&gt;&lt;/font&gt;, "UnionState", &lt;font color="#0000ff"&gt;SWITCH(TRUE, &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ([Rnk2]=2 &amp;amp;&amp;amp; [Rnk1]&amp;lt;&amp;gt;1) || ([Rnk2]=1 &amp;amp;&amp;amp; [Rnk1]=1) &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,Table1[State], Table2[State]))&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/--hX-eYds1co/UQ8V-4bb8ZI/AAAAAAAAFUA/dOzRZrxTxFw/s1600-h/image%25255B27%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Correct result of UNION ALL operation" border="0" alt="Correct result of UNION ALL operation" src="http://lh5.ggpht.com/-OAjY-8nSlHc/UQ8V_fGIWtI/AAAAAAAAFUI/hQRUz_OhU_M/image_thumb%25255B9%25255D.png?imgmax=800" width="504" height="219"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Now you can see that the UnionCountry and UnionState column gives us the required results for a &lt;strong&gt;UNION ALL&lt;/strong&gt; operation. This approach can be easily extended in case we have more than two tables to join. The only scenario where this approach will not work is when any of the participating tables has just one row (as the cross join will not give us more rows. Eg, cross-joining two tables with 3 and 1 rows will give only 3 rows whereas we need 4 rows for the UNION ALL). However, this can be resolved by adding a temporary table with two rows (so the cross join will be 3 * 1 * 2 = 6 rows) and then using this logic.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;7) To do the UNION operation instead of UNION ALL, we should remove all duplicate rows. For that, we can use SUMMARIZE function.&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;EVALUATE&lt;br&gt;&lt;font color="#0000ff"&gt;SUMMARIZE(&lt;/font&gt;&lt;br&gt;ADDCOLUMNS(&lt;br&gt;FILTER(&lt;br&gt;CROSSJOIN (&lt;br&gt;ADDCOLUMNS (Table1,"Rnk1",RANKX ( Table1, Table1[State],, 1, DENSE )&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;br&gt;ADDCOLUMNS (Table2,"Rnk2",RANKX ( Table2, Table2[State],, 1, DENSE )&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;br&gt;&amp;nbsp; ), ([Rnk1]=1 || [Rnk2]=2) || ([Rnk1]=2 &amp;amp;&amp;amp; [Rnk2]=1))&lt;br&gt;, "UnionCountry", SWITCH(TRUE, &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ([Rnk2]=2 &amp;amp;&amp;amp; [Rnk1]&amp;lt;&amp;gt;1) || ([Rnk2]=1 &amp;amp;&amp;amp; [Rnk1]=1), &lt;br&gt;Table1[Country], Table2[Country])&lt;br&gt;, "UnionState", SWITCH(TRUE, &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ([Rnk2]=2 &amp;amp;&amp;amp; [Rnk1]&amp;lt;&amp;gt;1) || ([Rnk2]=1 &amp;amp;&amp;amp; [Rnk1]=1), &lt;br&gt;Table1[State], Table2[State]))&lt;br&gt;&lt;font color="#0000ff"&gt;, [UnionCountry], [UnionState])&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-Wjg0yEsYNTQ/UQ8V_6WYA-I/AAAAAAAAFUQ/B3MXc-aiLzs/s1600-h/image%25255B30%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Correct result of UNION operation" border="0" alt="Correct result of UNION operation" src="http://lh5.ggpht.com/-3hiDKNr9i-8/UQ8WAalUJiI/AAAAAAAAFUY/sZ8hPC06T9o/image_thumb%25255B10%25255D.png?imgmax=800" width="357" height="265"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;In this scenario, there is no difference in the result as there are no duplicate rows. Let me know what you think of this!&lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=jQLYeAm6P1c:lzpIp8ZTYio:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=jQLYeAm6P1c:lzpIp8ZTYio:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=jQLYeAm6P1c:lzpIp8ZTYio:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/jQLYeAm6P1c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/7211250939883917223/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2013/02/union-operation-in-dax-queries.html#comment-form" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/7211250939883917223?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/7211250939883917223?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/jQLYeAm6P1c/union-operation-in-dax-queries.html" title="UNION Operation in DAX Queries" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-b9PUT2QTsx8/UQ8V3vFmWdI/AAAAAAAAFSY/dsVQ7QoeWx4/s72-c/image_thumb%25255B1%25255D.png?imgmax=800" height="72" width="72" /><thr:total>5</thr:total><feedburner:origLink>http://www.sqljason.com/2013/02/union-operation-in-dax-queries.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EDQno8fCp7ImA9WhNaFE0.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-111865575841472770</id><published>2013-01-28T14:34:00.001-05:00</published><updated>2013-01-28T14:34:33.474-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-28T14:34:33.474-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SSRS" /><title>Scatter Line Charts in SSRS</title><content type="html">&lt;p align="justify"&gt;&lt;font size="2"&gt;Sometime during the last month, I saw an image of an &lt;a title="Click here to read more on Archimidean Spiral" href="http://en.wikipedia.org/wiki/Archimedean_spiral" target="_blank"&gt;Archimedean Spiral&lt;/a&gt; and was wondering whether I could recreate the same in SSRS. The Archimedean Spiral is actually a scatter line chart (a combination of scatter chart and line chart). I have over 6+ years of experience creating visualizations using SSRS, but the closest I had come to such a visualization was the Scatter Chart. &lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;a href="http://lh3.ggpht.com/-17_ilJs92ic/UQbSqz6ptGI/AAAAAAAAFPQ/pjbRcYJapF8/s1600-h/image%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Scatter Line charts in SSRS" border="0" alt="Scatter Line charts in SSRS" src="http://lh5.ggpht.com/-BDuF4FhZ04E/UQbSrcclsYI/AAAAAAAAFPY/0wkxrzWSWzs/image_thumb%25255B1%25255D.png?imgmax=800" width="500" height="255"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;A scatter line chart is used either to show the relationship among the items in several distinct series of data or to plot a line using x and y coordinates. The x and y coordinates of the data marker are determined by two data values. A scatter line chart draws attention to uneven intervals in data. This type of chart is often used to plot scientific data, and can highlight the deviation of collected data from predicted results. A scatter line chart can also be used to organize data chronologically (even if the data is not in chronological order). For eg, consider the Scatter Chart below&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-tMi_XMhpZH4/UQbSr-zEDII/AAAAAAAAFPc/lUcQW_K3q5s/s1600-h/image%25255B8%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="Scatter chart" border="0" alt="Scatter chart" src="http://lh4.ggpht.com/-2jvTc6v3c78/UQbSsZmY43I/AAAAAAAAFPo/_uNAjj3cxQQ/image_thumb%25255B4%25255D.png?imgmax=800" width="300" height="262"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;A scatter chart doesn’t tell the full story as we don’t know the chronology in which the data was collected.&lt;/font&gt;&amp;nbsp; &lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-gk-_Okp8J1A/UQbSs710vdI/AAAAAAAAFPw/yUzYg-21NhU/s1600-h/image%25255B12%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="For the same scatter chart, the scatter-line charts can be different" border="0" alt="For the same scatter chart, the scatter-line charts can be different" src="http://lh6.ggpht.com/-25JWHqUAx7o/UQbStUDaRfI/AAAAAAAAFP4/hpDkXeHGsts/image_thumb%25255B6%25255D.png?imgmax=800" width="500" height="184"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;A scatter line chart can give that extra bit of information as you can see from the image above.&lt;/font&gt; To create a scatter line chart, you need to have at least two measures (for the X &amp;amp; Y coordinates) and a category group. Follow the steps below to create an Archimedean spiral using the scatter chart:-&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;1) Create a dataset with the two measures (X &amp;amp; Y coordinates) and a category. Since I am trying to replicate the Archimedean spiral, I used the formula given below to come up with the coordinates and category.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;img alt="\, r=a+b\theta" src="http://upload.wikimedia.org/math/5/7/d/57d458b61ac72a9a3100859841327baa.png"&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-WfCeKNdqhfo/UQbStyZr2kI/AAAAAAAAFQA/ayU5LdTjm_0/s1600-h/image%25255B18%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Dataset query for Archimedean spiral" border="0" alt="Dataset query for Archimedean spiral" src="http://lh4.ggpht.com/-V2Sdp0k7kwk/UQbSuTvc6mI/AAAAAAAAFQI/9Rbnj4iDwak/image_thumb%25255B8%25255D.png?imgmax=800" width="265" height="265"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;You can see that my category (the Pos field) is just a running number used for determining the order.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;2)&amp;nbsp; Drag and drop a &lt;em&gt;Smooth Line with Markers&lt;/em&gt; chart into the layout. Use Y as the value and Pos as the Category group.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-GTgY6Y4WOs0/UQbSuwQY2pI/AAAAAAAAFQQ/ErYtqS9qgvk/s1600-h/image%25255B21%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Smooth line chart with markers" border="0" alt="Smooth line chart with markers" src="http://lh3.ggpht.com/-WlEFxIA-FxA/UQbSvV_L5qI/AAAAAAAAFQY/XitkztxyJhg/image_thumb%25255B9%25255D.png?imgmax=800" width="401" height="265"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;3) Once you are done with that, click on the values and press F4 to bring up the chart series &lt;/font&gt;&lt;font color="#000000"&gt;properties. Under Data, expand DataPoint property and then expand Values. Now, type the following formula in the X property as shown in the image below&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3" size="2"&gt;=sum(Fields!X.Value)&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-2yuUPQyBxF0/UQbSv4HyK2I/AAAAAAAAFQg/H3HW9LW9GCA/s1600-h/image%25255B24%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Modifying X axis properties" border="0" alt="Modifying X axis properties" src="http://lh3.ggpht.com/-6BC6ik0aBqc/UQbSwXyHBNI/AAAAAAAAFQo/0Fu_ekV4Apk/image_thumb%25255B10%25255D.png?imgmax=800" width="504" height="236"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Note that X is the name of the field in our dataset and should be replaced by whatever is the field name that should be present in the X axis.&lt;/font&gt;&lt;/p&gt;     &lt;p&gt;&lt;font size="2"&gt;4) Preview it, and you should be able to see our Archimedean Spiral.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-QdnQzaTnvHg/UQbSxal_KFI/AAAAAAAAFQw/3JnOwSjnlns/s1600-h/image%25255B31%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Archimedean spiral in ssrs" border="0" alt="Archimedean spiral in ssrs" src="http://lh6.ggpht.com/-6xAJJh2D1yk/UQbSx1VgGJI/AAAAAAAAFQ4/IYby5cgAbA4/image_thumb%25255B13%25255D.png?imgmax=800" width="504" height="439"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;One thing to note here is that the lines are connected based on the sorting order of the Category group field. So in case you are using a name field like month (January, February, etc), ensure that the sorting order is based on the month number (else you might not get the right results). Feel free to download the report file from &lt;strong&gt;&lt;u&gt;&lt;a title="Download ScatterLine.rdl" href="https://docs.google.com/file/d/0B1k6zmQ4NXQlaUN5YzVTVWt1bzg/edit" target="_blank"&gt;here&lt;/a&gt;&lt;/u&gt;&lt;/strong&gt;. Though scatter line charts might not be as useful as &lt;a title="sparklines" href="http://en.wikipedia.org/wiki/Sparkline" target="_blank"&gt;sparklines&lt;/a&gt;, they have their place in data visualization and it is always good to know that you can make one using SSRS.&lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=z42wC8RTnG8:Ym-u1UCLjp0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=z42wC8RTnG8:Ym-u1UCLjp0:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=z42wC8RTnG8:Ym-u1UCLjp0:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/z42wC8RTnG8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/111865575841472770/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2013/01/scatter-line-charts-in-ssrs.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/111865575841472770?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/111865575841472770?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/z42wC8RTnG8/scatter-line-charts-in-ssrs.html" title="Scatter Line Charts in SSRS" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-BDuF4FhZ04E/UQbSrcclsYI/AAAAAAAAFPY/0wkxrzWSWzs/s72-c/image_thumb%25255B1%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.sqljason.com/2013/01/scatter-line-charts-in-ssrs.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUAMRnY9eyp7ImA9WhNbGUU.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-2098838640153140861</id><published>2013-01-23T18:29:00.001-05:00</published><updated>2013-01-23T18:29:47.863-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-23T18:29:47.863-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Activities / Whitepapers / Events" /><title>I’m speaking at the PASS Business Analytics Conference</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;The speaker lineup for the PASS Business Analytics Conference has been announced and I’m really excited to see my name in the list. In case you haven’t heard, &lt;/font&gt;&lt;a title="PASS BA Conference website" href="http://passbaconference.com" target="_blank"&gt;&lt;font size="2"&gt;PASS BA Conference&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt; is the premium conference for business analytics professionals. If you're a business analyst, data scientist, architect, or BA/BI practitioner, you can’t afford to miss this conference. &lt;/font&gt;&lt;/font&gt;&lt;font color="#000000" size="2"&gt;Attendees will be exposed to an unparalleled range of information about business analytics—with over 60 sessions to choose from—covering data discovery, data exploration and visualization, predictive analytics, content management and architecture, collaboration, information strategies, and much more. &lt;/font&gt;&lt;font color="#000000" size="2"&gt;You can register for the conference by clicking on this &lt;strong&gt;&lt;u&gt;&lt;a title="Register for PASS BA Conference" href="http://passbaconference.com/Register.aspx#.UQBw5yc0V8E" target="_blank"&gt;link&lt;/a&gt;&lt;/u&gt;&lt;/strong&gt;.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-jP2gLq8pL84/UQByaKp-aGI/AAAAAAAAFN0/G6mdIpQ0r8Q/s1600-h/PASS_BAC_I%252527m%252520Speaking_Banner%252520%2525281%252529%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="PASS BA Conference I am speaking" border="0" alt="PASS BA Conference I am speaking" src="http://lh5.ggpht.com/-4IFT9JwhjhE/UQByaroOndI/AAAAAAAAFN8/zWZJjJgTeT0/PASS_BAC_I%252527m%252520Speaking_Banner%252520%2525281%252529_thumb%25255B2%25255D.png?imgmax=800" width="254" height="254"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;I am really honoured to be presenting along with such an impressive &lt;a title="Click here to see all the speakers for PASS BA Conference" href="http://passbaconference.com/Speakers.aspx#.UQBxgic0V8E" target="_blank"&gt;list of speakers&lt;/a&gt;. My session details are given below&lt;/font&gt;&lt;/p&gt; &lt;h6&gt;&lt;font color="#008000" size="2"&gt;GeoSpatial Analytics Using Microsoft BI&lt;/font&gt;&lt;/h6&gt; &lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;Speaker(s)&lt;/strong&gt;:&amp;nbsp; &lt;/font&gt;&lt;a href="http://passbaconference.com/Sessions/SpeakerDetails.aspx?spid=759"&gt;&lt;font size="2"&gt;Jason Thomas&lt;/font&gt;&lt;/a&gt; &lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;Duration&lt;/strong&gt;: 60 minutes&lt;/font&gt; &lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;Track&lt;/strong&gt;: Data Analytics and Visualization&lt;/font&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;In this age of big data, location matters more than many people imagine. Almost every set of data has some geographic information tied to it, and it is all the more pertinent to understand and unravel the patterns and trends behind them. This session will start by explaining why GeoSpatial analytics is important in today's world and then continue by exploring how we can share, analyze, and visualize data using the comprehensive Microsoft BI toolset, including Power View, GeoFlow, SQL Server Reporting Services, and more. The session will also feature practical demos for each of these tools, during which we will work on some of the publicly available datasets to uncover some interesting facts.&lt;/font&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Don’t forget to drop in and say a hi to me, in case you are attending the conference.&lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=uW6CeOZK4Jk:bV940FE-vEA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=uW6CeOZK4Jk:bV940FE-vEA:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=uW6CeOZK4Jk:bV940FE-vEA:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/uW6CeOZK4Jk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/2098838640153140861/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2013/01/im-speaking-at-pass-business-analytics.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/2098838640153140861?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/2098838640153140861?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/uW6CeOZK4Jk/im-speaking-at-pass-business-analytics.html" title="I’m speaking at the PASS Business Analytics Conference" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-4IFT9JwhjhE/UQByaroOndI/AAAAAAAAFN8/zWZJjJgTeT0/s72-c/PASS_BAC_I%252527m%252520Speaking_Banner%252520%2525281%252529_thumb%25255B2%25255D.png?imgmax=800" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://www.sqljason.com/2013/01/im-speaking-at-pass-business-analytics.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEMQn0-eSp7ImA9WhNbFEk.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-8425546192339444619</id><published>2013-01-17T12:41:00.001-05:00</published><updated>2013-01-17T12:44:43.351-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-17T12:44:43.351-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PowerPivot" /><category scheme="http://www.blogger.com/atom/ns#" term="DAX" /><title>Row Selection Using Slicers in PowerPivot - Part 2</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;This post is a continuation of the &lt;a title="Row Selection Using Slicers in PowerPivot &amp;ndash; Part 1" href="http://www.sqljason.com/2013/01/row-selection-using-slicers-in.html" target="_blank"&gt;Row Selection Using Slicers in PowerPivot – Part 1&lt;/a&gt; (so it might be a good idea to read that post before this). In our last post, we discussed the basic solution pattern for row selection using slicers in PowerPivot. In this post, we will discuss two other scenarios which are slightly more complex but still uses the same pattern.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-V3-PT3gHyZo/UPg3mJ7aoeI/AAAAAAAAFJk/QILJgXfFx6g/s1600-h/image3.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="Row selection using slicers in PowerPivot part 2" border="0" alt="Row selection using slicers in PowerPivot part 2" src="http://lh5.ggpht.com/-_6B8LYoacBU/UPg3mhwSPtI/AAAAAAAAFJs/zgVfXI_L0Qo/image_thumb1.png?imgmax=800" width="429" height="205"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;strong&gt;&lt;u&gt;&lt;font color="#008000" size="2"&gt;Scenario III - GroupNames in multiple dimensions&lt;/font&gt;&lt;/u&gt; &lt;/strong&gt;&lt;br&gt;&lt;font color="#000000" size="2"&gt;Our data model for this scenario will have a Product table, a Customer table and a Fact table which shows the sales by Product and Customer. The requirement is to select either Product or Customer in the slicer and display the appropriate rows in the pivot table.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-Gmo6SssgJF8/UPg3nSSz6mI/AAAAAAAAFJ0/A0JLLQIocsQ/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Scenario 3 - data" border="0" alt="Scenario 3 - data" src="http://lh4.ggpht.com/-y-AwItuPPuA/UPg3n1ck90I/AAAAAAAAFJ8/l-Vpzf_8o7c/image_thumb%25255B1%25255D.png?imgmax=800" width="500" height="95"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;1) As per the solution steps, we first have to create the Group table&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-rQRdGp920JQ/UPg3o8NNnmI/AAAAAAAAFKE/tUTQXGOHQNU/s1600-h/image%25255B7%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Group table for scenario 3" border="0" alt="Group table for scenario 3" src="http://lh5.ggpht.com/-XrFE9fFWW5E/UPg3p8OlDTI/AAAAAAAAFKM/kzt5uVqcneU/image_thumb%25255B2%25255D.png?imgmax=800" width="504" height="250"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Note that we need two grain columns here, as the GroupNames belong to two dimensions – Product and Customer. The GroupName will be Customer and Product, and the GroupValues will be the actual product or customer values depending on the GroupName. As with the previous posts, I use MS Query to generate this table.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-HtPPQoRhmJY/UPg3qCvbnHI/AAAAAAAAFKU/xNqnEd1IELs/s1600-h/image%25255B10%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="MS Query scenario 3" border="0" alt="MS Query scenario 3" src="http://lh5.ggpht.com/-GZf-6Q_A4VM/UPg3rjPu3QI/AAAAAAAAFKc/gY4UkvZUs2Y/image_thumb%25255B3%25255D.png?imgmax=800" width="504" height="181"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;SELECT Expr1000 AS GroupName, Customer1 AS GroupValue, ProductKey1 AS Product, Customer FROM &lt;br&gt;(&lt;br&gt;SELECT 'Customer' , C.Customer1, `Sheet1$`.ProductKey1, `Sheet1$`.Customer&lt;br&gt;FROM `Sheet1$` `Sheet1$`&lt;br&gt;INNER JOIN `Sheet1$` C&lt;br&gt;ON `Sheet1$`.Customer=C.CustomerKey&lt;br&gt;UNION ALL&lt;br&gt;SELECT 'Product', P.Product, `Sheet1$`.ProductKey1 , `Sheet1$`.Customer&lt;br&gt;FROM `Sheet1$` `Sheet1$`&lt;br&gt;INNER JOIN `Sheet1$` P&lt;br&gt;ON `Sheet1$`.ProductKey1=P.ProductKey&lt;br&gt;)&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;2) Add this new table (Group) to the data model and then relate the Product &amp;amp; Customer column in this table to the ProductKey column&amp;nbsp; in the Product table &amp;amp; CustomerKey column in the Customer table.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-QASdyjN7Uos/UPg3sLKnP5I/AAAAAAAAFKk/-sQKYdd_NH0/s1600-h/image%25255B13%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Scenario 3 data model" border="0" alt="Scenario 3 data model" src="http://lh3.ggpht.com/-v1bCmwYvJiw/UPg3tHC20rI/AAAAAAAAFKs/Jq3cFxUEDjA/image_thumb%25255B4%25255D.png?imgmax=800" width="504" height="259"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;3) Hide the original measure Sales, and then create a new measure with the formula given below&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3" size="2"&gt;NewSales:=CALCULATE(SUM(Fact[Sales]), 'Group')&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;4) Check out the results by creating a pivot table with GroupValue on the rows, NewSales on Values and GroupName in Slicers.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-EBpxezA9Lg4/UPg3t36tqnI/AAAAAAAAFK0/OAzdBLnxnYs/s1600-h/image%25255B19%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Scenario 3 results" border="0" alt="Scenario 3 results" src="http://lh4.ggpht.com/-5irlRsPLxjk/UPg3u1CguhI/AAAAAAAAFK8/a5P987u9V0U/image_thumb%25255B6%25255D.png?imgmax=800" width="504" height="99"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Download the Excel 2013 file with the solution from &lt;a title="Download Scenario3_ManyDimensions.xlsx" href="https://docs.google.com/file/d/0B1k6zmQ4NXQlNVVwR01qRzNxdUk/edit" target="_blank"&gt;&lt;strong&gt;&lt;u&gt;here&lt;/u&gt;&lt;/strong&gt;&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;   &lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font color="#008000" size="2"&gt;Scenario IV – Hybrid Scenario&lt;/font&gt;&lt;/u&gt;&amp;nbsp;&lt;/strong&gt;&lt;br&gt;&lt;font color="#000000" size="2"&gt;In this scenario, we are going to combine all the different scenarios we discussed till now and see how to handle that. The data model for this scenario will contain a Fact table which shows sales by Product and Customer, a Product table with the Product and SubCategory information, a Customer table and a Promotions table which has a many to many relationship with Product. The requirement is to have SubCategory (Scanario I), Promotions (Scenario II) and Customer (Scenario III) on slicers.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-p7DKsqJbjvU/UPg3vj53cII/AAAAAAAAFLE/c7zr4H2wbhU/s1600-h/image%25255B23%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Scenario 4 data" border="0" alt="Scenario 4 data" src="http://lh6.ggpht.com/-VpkmRpf3JqE/UPg3wS0ctiI/AAAAAAAAFLM/8UnGb_ye-Zc/image_thumb%25255B8%25255D.png?imgmax=800" width="500" height="80"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;1) As usual, the first step is to generate the Group table.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-Ih-1UwhZfVM/UPg3xKUC11I/AAAAAAAAFLU/7Fh9fmceBKc/s1600-h/image%25255B26%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Group table for scenario 4" border="0" alt="Group table for scenario 4" src="http://lh3.ggpht.com/-n-654OgVPx8/UPg3x0M3FHI/AAAAAAAAFLc/kJVltkLYdVc/image_thumb%25255B9%25255D.png?imgmax=800" width="301" height="265"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Note that even though we have only 4 subcategories, we end up with 6 rows because we will have to ensure that the grain is at a Product and Customer level. Similarly, we end up with&amp;nbsp; 9 rows for Promotions when we convert the granularity of the Promotions table from just Product to the Product and Customer level. Find below the MS Query way of generating this table&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-5caq83ZtsLE/UPg3y9cR8gI/AAAAAAAAFLk/FIktuljkhQ8/s1600-h/image%25255B29%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="MS Query for scenario 4" border="0" alt="MS Query for scenario 4" src="http://lh4.ggpht.com/-HRaVHVf9hl0/UPg3z4-4j9I/AAAAAAAAFLs/XjvgijIjdxQ/image_thumb%25255B10%25255D.png?imgmax=800" width="504" height="235"&gt;&lt;/a&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;SELECT Expr1000 AS GroupName, SubCategory AS GroupValue, ProductKey1 AS Product, Customer FROM &lt;br&gt;(&lt;br&gt;SELECT 'SubCategory',S.SubCategory, `Sheet1$`.ProductKey1, `Sheet1$`.Customer&lt;br&gt;FROM `C:\Users\Jason\Desktop\Blog\RowSelection\Scenario4_Hybrid.xlsx`.`Sheet1$` `Sheet1$`&lt;br&gt;INNER JOIN `C:\Users\Jason\Desktop\Blog\RowSelection\Scenario4_Hybrid.xlsx`.`Sheet1$` `S`&lt;br&gt;ON `Sheet1$`.ProductKey1=S.ProductKey&lt;br&gt;UNION ALL&lt;br&gt;SELECT 'Promotions',P.Promotions, P.Product1, S.Customer&lt;br&gt;FROM `C:\Users\Jason\Desktop\Blog\RowSelection\Scenario4_Hybrid.xlsx`.`Sheet1$` `P`&lt;br&gt;INNER JOIN `C:\Users\Jason\Desktop\Blog\RowSelection\Scenario4_Hybrid.xlsx`.`Sheet1$` `S`&lt;br&gt;ON P.Product1=S.ProductKey1&lt;br&gt;UNION ALL&lt;br&gt;SELECT 'Customer', Customer, ProductKey1, Customer&lt;br&gt;FROM `C:\Users\Jason\Desktop\Blog\RowSelection\Scenario4_Hybrid.xlsx`.`Sheet1$`&lt;br&gt;WHERE Customer IS NOT NULL&lt;br&gt;)&lt;/font&gt;&lt;br&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;2) Add this new table (Group) to the data model and then relate the Product &amp;amp; Customer column in this table to the ProductKey column&amp;nbsp; in the Product table &amp;amp; CustomerKey column in the Customer table.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-Yc5F6wiNe9g/UPg30wDVAEI/AAAAAAAAFL0/wYa5fpqO-WE/s1600-h/image%25255B34%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Scenario 4 data model" border="0" alt="Scenario 4 data model" src="http://lh6.ggpht.com/-NA376M_qUSc/UPg315a2aRI/AAAAAAAAFL8/LkKl3i_by_Y/image_thumb%25255B13%25255D.png?imgmax=800" width="404" height="404"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;3) Hide the original measure Sales, and then create a new measure with the formula given below&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3" size="2"&gt;NewSales:=CALCULATE(sum(Fact[Sales]), 'Group', Promotions)&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Also note the use of the Promotions table (which is the many to many table) in the filter part of the calculate statement.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;4) Check out the results by creating a pivot table with GroupValue on the rows, NewSales on Values and GroupName in Slicers.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-MrPfaqOSC9Q/UPg33JxA9ZI/AAAAAAAAFME/CU28C_97j5k/s1600-h/image%25255B37%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Scenario 4 results" border="0" alt="Scenario 4 results" src="http://lh5.ggpht.com/-rEKQvcN1VJA/UPg33675iLI/AAAAAAAAFMM/4cgwmgKOI04/image_thumb%25255B14%25255D.png?imgmax=800" width="504" height="134"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Download the Excel 2013 file with the solution from &lt;a title="Download Scenario4_Hybrid.xlsx" href="https://docs.google.com/file/d/0B1k6zmQ4NXQlUUV2Q0xFNkVOSjQ/edit" target="_blank"&gt;&lt;strong&gt;&lt;u&gt;here&lt;/u&gt;&lt;/strong&gt;&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;With that, we come to the end of this 2 part series on how to change the rows using slicers in PowerPivot. As you would have seen, the bulk of the work lies in generating the Group table and the rest is pretty simple. Hope these scenarios will help you in case you ever need to do the same.&lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=_d22P__AGGA:iLVrcm3t1N8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=_d22P__AGGA:iLVrcm3t1N8:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=_d22P__AGGA:iLVrcm3t1N8:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/_d22P__AGGA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/8425546192339444619/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2013/01/row-selection-using-slicers-in_17.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/8425546192339444619?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/8425546192339444619?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/_d22P__AGGA/row-selection-using-slicers-in_17.html" title="Row Selection Using Slicers in PowerPivot - Part 2" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-_6B8LYoacBU/UPg3mhwSPtI/AAAAAAAAFJs/zgVfXI_L0Qo/s72-c/image_thumb1.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.sqljason.com/2013/01/row-selection-using-slicers-in_17.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8MQ3Y-cSp7ImA9WhNbFEk.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-4680818174325287039</id><published>2013-01-15T10:00:00.000-05:00</published><updated>2013-01-17T12:48:02.859-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-17T12:48:02.859-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PowerPivot" /><category scheme="http://www.blogger.com/atom/ns#" term="DAX" /><title>Row Selection Using Slicers in PowerPivot - Part 1</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;A couple of months back, I had written a post on ‘&lt;a title="Measure selection using Slicers in PowerPivot" href="http://www.sqljason.com/2012/11/measure-selection-using-slicers-in.html" target="_blank"&gt;Measure selection using Slicers in PowerPivot&lt;/a&gt;’ and this turned out to be one of my most popular ones in the PowerPivot / DAX category. It was just a matter of time before someone asked how to do the same with rows or dimension attributes using slicers in PowerPivot. And the case supporting it is also becoming strong with more and more dashboards being built in Power View and Excel. Well, as usual, this functionality is not available out of the box but you could simulate it with a little change to your data model. Read on for the solution.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-j6Tg3sOPY5o/UPTElKbH1xI/AAAAAAAAFFo/IKWxDA6qf5Y/s1600-h/SNAGHTML5e4edc%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="Row Selection using Slicers in PowerPivot Part 1" border="0" alt="Row Selection using Slicers in PowerPivot Part 1" src="http://lh5.ggpht.com/-NC2YLhvG06o/UPTElotyEcI/AAAAAAAAFFw/-NnaMS0hwZo/SNAGHTML5e4edc_thumb%25255B1%25255D.png?imgmax=800" width="429" height="205"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;I will be first briefly explain the solution pattern and then apply it to a couple of scenarios.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000"&gt;&lt;strong&gt;&lt;u&gt;&lt;font color="#008000" size="2"&gt;Solution&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;br&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;1) A new table should be built and added to the existing data model. The new table should have at least 3 columns &lt;br&gt;&lt;strong&gt;-&lt;/strong&gt; &lt;strong&gt;GroupName&lt;/strong&gt; : the text displayed in the slicers (for e.g., Product, Customer, etc.) &lt;br&gt;- &lt;strong&gt;GroupValue &lt;/strong&gt;: the actual values that should be displayed in the rows on selecting the slicer values (for e.g., if Product is selected in the slicer for GroupName, then GroupValues will be the Product values) &lt;br&gt;- &lt;strong&gt;Grain of the Tables&lt;/strong&gt; :&amp;nbsp; &lt;/font&gt;&lt;font color="#000000"&gt;If all the GroupNames displayed in the slicer belong to the same dimension (for eg, Product, Category and SubCategory in the Product dimension), then only one column is required which would be the grain of the dimension (to be precise, the column of the table linked to the facts which is usually the grain of the dimension). If multiple dimensions are involved in the GroupNames (for eg, Product and Customer), then&amp;nbsp; the number of columns increases based on the grain of the participating dimensions.For each GroupName, all valid combinations of GroupValue and Grain columns should be generated.&lt;br&gt;2) The grain columns should then be related to the dimensions.&lt;br&gt;3) Create new calculated measures for each of the required measure by passing the new table in the filter part of a calculate statement and then use them in the pivot tables or charts.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;strong&gt;&lt;u&gt;Scenario I - GroupNames in one dimension and 1-to-Many Relationship&lt;/u&gt; &lt;/strong&gt;&lt;br&gt;&lt;/font&gt;Our data model for this scenario will have a Product table and a Fact table which shows the sales by Product and Customer. The Product table has ProductKey, Product, SubCategory and Category columns. Our requirement is that we should be able to select Product, SubCategory or Category in the slicers and display the selected values on the row of the pivot table.&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-aw3UDCBU52M/UPTEmF0pZFI/AAAAAAAAFF0/2WiiZn6huNA/s1600-h/image16.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Source tables" border="0" alt="Source tables" src="http://lh5.ggpht.com/-i0ibhqQP7Fw/UPTEmxCtatI/AAAAAAAAFGA/50C-WvCS6DI/image_thumb6.png?imgmax=800" width="504" height="123"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;1) As per the solution steps, we will have to create a new table as shown below&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-4pGFfRbqtAM/UPTEnl7I3cI/AAAAAAAAFGI/kte7IkMCUqM/s1600-h/SNAGHTML67e7d8a5.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Group table for Scenario 1" border="0" alt="Group table for Scenario 1" src="http://lh5.ggpht.com/-wgttpuvxQ1o/UPTEoK6E3uI/AAAAAAAAFGQ/odTX4LBxDYo/SNAGHTML67e7d8a_thumb2.png?imgmax=800" width="300" height="280"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Since the slicers need to display the three levels, the GroupName values will be Category, SubCategory and Product. The granularity is at the Product level and hence that will be the third column. Note that for each value in GroupName, there should be a row mapping the GroupValue to the grain column (which is Product here). This sort of table is very easy to create if the source is a relational database. For this demo, I used linked tables and hence to automate the creation of this table, I had to use &lt;strong&gt;Microsoft Query &lt;/strong&gt;as a datasource to pull data from the linked tables.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-5yCj7aVDivo/UPTEpPNB9eI/AAAAAAAAFGY/Wg43PWE3uD0/s1600-h/image9.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="MS Query for Scenario 1" border="0" alt="MS Query for Scenario 1" src="http://lh3.ggpht.com/-Q6xt6iH9FjY/UPTEp1i3AkI/AAAAAAAAFGg/3Iou67uUAkA/image_thumb3.png?imgmax=800" width="504" height="250"&gt;&lt;/a&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;SELECT Expr1000 AS GroupName, Category AS GroupValue, ProductKey AS Product FROM (&lt;br&gt;SELECT 'Category' , 'Sheet1$'.Category , 'Sheet1$'.ProductKey &lt;br&gt;FROM 'Sheet1$' 'Sheet1$'&lt;br&gt;WHERE 'Sheet1$'.ProductKey&amp;nbsp; IS NOT NULL&lt;br&gt;UNION ALL&lt;br&gt;SELECT 'SubCategory' , 'Sheet1$'.SubCategory , 'Sheet1$'.ProductKey &lt;br&gt;FROM 'Sheet1$' 'Sheet1$'&lt;br&gt;WHERE 'Sheet1$'.ProductKey&amp;nbsp; IS NOT NULL&lt;br&gt;UNION ALL&lt;br&gt;SELECT 'Product' , 'Sheet1$'.Product , 'Sheet1$'.ProductKey &lt;br&gt;FROM 'Sheet1$' 'Sheet1$'&lt;br&gt;WHERE 'Sheet1$'.ProductKey&amp;nbsp; IS NOT NULL&lt;br&gt;)&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;(&lt;u&gt;Please note that I am not a MS query datasource expert and I had to workaround getting the column alias names by bringing the outermost select statement. This should have been a simple UNION ALL in SQL Server&lt;/u&gt;). If there is any data change in the linked tables, the Refresh button should be clicked twice in the Excel window (so that the Query can populate the changed data in the new table as well as refresh the PowerPivot model with the changed data).&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;2) Add this new table (Group) to the data model and then relate the Product column in this table to the ProductKey column in the Product table.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-4R15eyi3-sc/UPTEqvJULuI/AAAAAAAAFGo/88yTNUqPMHg/s1600-h/image13.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Data Model for Scenario 1" border="0" alt="Data Model for Scenario 1" src="http://lh4.ggpht.com/-UPAzwrENhl4/UPTEr1vEMFI/AAAAAAAAFGw/GA-KpN9ms7g/image_thumb5.png?imgmax=800" width="404" height="285"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;3) Hide the original measure Sales, and then create a new measure with the formula given below&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;NewSales:=CALCULATE(SUM(Fact[Sales]), 'Group')&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;font size="2"&gt;4) Check out the results by creating a pivot table with GroupValue on the rows, NewSales on Values and GroupName in Slicers.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-EYLZMORsoZk/UPTEsggM0EI/AAAAAAAAFG4/g6k4J2SmN54/s1600-h/image%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="End result for Scenario 1" border="0" alt="End result for Scenario 1" src="http://lh5.ggpht.com/-jgM5PJO4XnE/UPTEtVarhWI/AAAAAAAAFHA/YJq0wA6G6-4/image_thumb.png?imgmax=800" width="504" height="68"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Download the Excel 2013 file with the solution from &lt;strong&gt;&lt;u&gt;&lt;a title="Download Scenario1_SameDimension1toMany.xlsx" href="https://docs.google.com/file/d/0B1k6zmQ4NXQlYzZSVGx1R3BsREU/edit" target="_blank"&gt;here&lt;/a&gt;&lt;/u&gt;.&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;strong&gt;&lt;u&gt;Scenario II - GroupNames in one dimension and Many-to-Many Relationship&lt;/u&gt; &lt;/strong&gt;&lt;br&gt;&lt;/font&gt;Our data model for this scenario will have a Product table, Fact table which shows the sales which shows the sales by Product and Customer, and two tables – Sales Rep and Promotions which will have a many to many relationship with Product.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-_gj39ZmxEyM/UPTEuKueK4I/AAAAAAAAFHI/r92yZjdGUoU/s1600-h/image%25255B6%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Source tables for scenario 2" border="0" alt="Source tables for scenario 2" src="http://lh6.ggpht.com/-i38kZP0pKxU/UPTEvNh1aDI/AAAAAAAAFHQ/JG191jFjHho/image_thumb%25255B1%25255D.png?imgmax=800" width="504" height="121"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;1) The Group table should have the below format&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&amp;nbsp;&lt;a href="http://lh3.ggpht.com/-ZPPH-yLVDA4/UPTEvwpzWSI/AAAAAAAAFHY/7mOP7OUDyrg/s1600-h/SNAGHTML75dbc0%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Group table for Scenario 2" border="0" alt="Group table for Scenario 2" src="http://lh5.ggpht.com/-03aUWr49Gng/UPTEw_FpZLI/AAAAAAAAFHg/P8_-7wBJf8M/SNAGHTML75dbc0_thumb%25255B1%25255D.png?imgmax=800" width="320" height="261"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;To create the Group table, we again use Microsoft Query as a datasource to pull data from the linked tables.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-KGrSEeNKieM/UPTExhctjBI/AAAAAAAAFHo/UE8mJncVuSs/s1600-h/image%25255B9%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="MS Query for Scenario 2" border="0" alt="MS Query for Scenario 2" src="http://lh3.ggpht.com/-JNgKML0VYM8/UPTEyixEiDI/AAAAAAAAFHw/RIAfdbI6TK0/image_thumb%25255B2%25255D.png?imgmax=800" width="504" height="193"&gt;&lt;/a&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;SELECT Expr1000 AS GroupName, SalesRep AS GroupValue, Product1 AS Product FROM (&lt;br&gt;SELECT 'SalesRep', `Sheet1$`.SalesRep, `Sheet1$`.Product1&lt;br&gt;FROM `Sheet1$` `Sheet1$`&lt;br&gt;WHERE `Sheet1$`.Product1&amp;nbsp; IS NOT NULL&lt;br&gt;UNION ALL&lt;br&gt;SELECT 'Promotions' , `Sheet1$`.Promotions , `Sheet1$`.Product2&lt;br&gt;FROM `Sheet1$` `Sheet1$`&lt;br&gt;WHERE `Sheet1$`.Product2&amp;nbsp; IS NOT NULL&lt;br&gt;)&lt;/font&gt;&lt;br&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;2) Add this new table (Group) to the data model and then relate the Product column in this table to the ProductKey column in the Product table.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-bHwdrsIa3Yo/UPTEztETsQI/AAAAAAAAFH4/bEFIrP9t-PE/s1600-h/image%25255B13%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Data model for Scenario 2" border="0" alt="Data model for Scenario 2" src="http://lh6.ggpht.com/-R1VsjLUsPes/UPTE0FVR5nI/AAAAAAAAFIA/PC0chM9kZ4c/image_thumb%25255B4%25255D.png?imgmax=800" width="404" height="322"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;3) Hide the original measure Sales, and then create a new measure with the formula given below&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;NewSales:=CALCULATE(sum(Fact[Sales]), 'Group', 'Promotions', 'Rep')&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;font size="2"&gt;4) Check out the results by creating a pivot table with GroupValue on the rows, NewSales on Values and GroupName in Slicers.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-eJcPWlh-ecs/UPTE0wRfeTI/AAAAAAAAFII/JPL_NVUXcJY/s1600-h/image%25255B16%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="End result for Scenario 2" border="0" alt="End result for Scenario 2" src="http://lh4.ggpht.com/-QcePXeE5zHs/UPTE1X7i11I/AAAAAAAAFIQ/-c11IVFdK80/image_thumb%25255B5%25255D.png?imgmax=800" width="504" height="99"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;Download the Excel 2013 file with the solution from &lt;strong&gt;&lt;u&gt;&lt;a title="Download Scenario2_SameDimensionManytoMany.xlsx" href="https://docs.google.com/file/d/0B1k6zmQ4NXQlNmFjamRyV1ZoVk0/edit" target="_blank"&gt;here&lt;/a&gt;&lt;/u&gt;.&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;I have got two more scenarios to show but guess that will have to wait till the second part of this series – &lt;a title="Row Selection Using Slicers in PowerPivot &amp;ndash; Part 2" href="http://www.sqljason.com/2013/01/row-selection-using-slicers-in_17.html" target="_blank"&gt;&lt;strong&gt;&lt;u&gt;Row Selection Using Slicers in PowerPivot – Part 2&lt;/u&gt;&lt;/strong&gt;&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;&lt;u&gt;Note&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;There are some unique concepts here which might raise questions like &lt;br&gt;- why didn't I use DAX queries to seed my Group table? Well, I couldn't find a easy way to do union in DAX and that is the reason why I used MS query. It might not be the best way but it sure is an option.&lt;br&gt;- Is there any other way to avoid the double refresh of the file? I couldn't find any other option to do so (actually, you will need to do that even if you are using DAX queries to seed the Group table). That is, if you are avoiding VBA. Javier Guillen has written a &lt;strong&gt;&lt;u&gt;&lt;a title="Leveraging DAX query tables for staging Data Transformations" href="http://javierguillen.wordpress.com/2013/01/15/leveraging-dax-table-queries-for-staging-data-transformations/" target="_blank"&gt;post&lt;/a&gt;&lt;/u&gt;&lt;/strong&gt; on how to do it with a single refresh using VBA (check out the final part of his blog for the VBA code).&lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=ek4PQEMG5Qs:oNZYP1P4MN8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=ek4PQEMG5Qs:oNZYP1P4MN8:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=ek4PQEMG5Qs:oNZYP1P4MN8:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/ek4PQEMG5Qs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/4680818174325287039/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2013/01/row-selection-using-slicers-in.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/4680818174325287039?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/4680818174325287039?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/ek4PQEMG5Qs/row-selection-using-slicers-in.html" title="Row Selection Using Slicers in PowerPivot - Part 1" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-NC2YLhvG06o/UPTElotyEcI/AAAAAAAAFFw/-NnaMS0hwZo/s72-c/SNAGHTML5e4edc_thumb%25255B1%25255D.png?imgmax=800" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://www.sqljason.com/2013/01/row-selection-using-slicers-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck8ERHs8cSp7ImA9WhNUFUo.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-3379443151933241257</id><published>2013-01-07T10:00:00.000-05:00</published><updated>2013-01-07T10:00:05.579-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-07T10:00:05.579-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PowerPivot" /><category scheme="http://www.blogger.com/atom/ns#" term="DAX" /><title>Group Multiple Rows to Single Delimited Row in PowerPivot</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;When PowerPivot was announced a couple of years back, I was one among the many who started feeling insecure on having to learn a new trade. I could have sat there and kept on cribbing, or picked myself up and started my baby steps towards the new technology. As Hillary Clinton said, the challenges of change are always hard. It is important that we begin to unpack those challenges and realize that we each have a role that requires us to change and become more responsible for shaping our own future. I am glad that I gave PowerPivot a chance and kept on learning (it sure helps sitting next to a passionate PowerPivot supporter like &lt;a title="Javier's Blog" href="http://javierguillen.wordpress.com/" target="_blank"&gt;Javier Guillen&lt;/a&gt;!), else I wouldn’t have realized how much useful it is to me. Agreed that it has it’s fair sets of limitations, but as the community grows and the technology matures, we will see that many of it gets resolved or have workarounds. For eg, if you had asked me before on whether there was any way in PowerPivot to group all the row values into a single delimited row, I would have said no. But seeing this question in the PowerPivot forum, I decided to spend a little more time in the weekend and found a workaround, which I am sharing through this post.&lt;/font&gt;&lt;br&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-Nog3Q0PTXmo/UOonjT-kwwI/AAAAAAAAFCc/YmAYaFQi06w/s1600-h/image%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="Group Multiple Rows to Single Delimited Row in PowerPivot" border="0" alt="Group Multiple Rows to Single Delimited Row in PowerPivot" src="http://lh3.ggpht.com/-me-2hD1_jEo/UOonj63dq9I/AAAAAAAAFCk/yP1RY4IUTxQ/image_thumb%25255B1%25255D.png?imgmax=800" width="500" height="258"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;u&gt;&lt;strong&gt;&lt;font color="#008000" size="3"&gt;Scenario&lt;/font&gt;&lt;br&gt;&lt;/strong&gt;&lt;/u&gt;Let us say that we have a table which shows the sales by Country and State. The result should be a table which shows the sum of sales by country along with a delimited row of states as shown below&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-aAk41rufUNg/UOonlCInXgI/AAAAAAAAFCs/lbF-VKPXfSc/s1600-h/image%25255B7%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="Scenario" border="0" alt="Scenario" src="http://lh3.ggpht.com/-yakHp4Iuo5c/UOonldov3OI/AAAAAAAAFC0/olBlyP3MmWs/image_thumb%25255B3%25255D.png?imgmax=800" width="500" height="198"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;&lt;u&gt;&lt;font color="#008000" size="3"&gt;Solution&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;There is only one function (atleast as far as I know) in PowerPivot that returns a delimited list from multiple rows – &lt;a title="PATH Function (DAX)" href="http://technet.microsoft.com/en-us/library/gg492167.aspx" target="_blank"&gt;PATH()&lt;/a&gt;. But the issue is that PATH() works only with a parent child hierarchy. So the trick for getting this piece done would be to build an artificial parent child hierarchy. Follow the steps below to get the solution:-&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;1) Make a calculated column called Rnk which will generate a running number of the states within a country.&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;=RANKX (&lt;br&gt;&amp;nbsp; FILTER ( All ( Table1 ), Table1[Country] = EARLIER ( Table1[Country] ) ),&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table1[State],&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,&amp;nbsp;&amp;nbsp; DENSE&lt;br&gt;&amp;nbsp; )&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;This will allow us to uniquely identify each state value within a country.&lt;/font&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-bsC52SU7UoU/UOonmBzIsbI/AAAAAAAAFC8/0W7oQ1t7kiw/s1600-h/SNAGHTML75f5bdb%25255B6%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Rank States within country using RANKX" border="0" alt="Rank States within country using RANKX" src="http://lh6.ggpht.com/-0csAROS3-68/UOonm3ZE47I/AAAAAAAAFDE/iJ-VVf7oHJU/SNAGHTML75f5bdb_thumb%25255B3%25255D.png?imgmax=800" width="500" height="182"&gt;&lt;/a&gt;  &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;2) Make a calculated column called ParRnk with the formula below&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;=IF (&lt;br&gt;&amp;nbsp; Table1[Rnk] &amp;lt;&amp;gt; 1,&lt;br&gt;&amp;nbsp; Table1[Rnk] - 1&lt;br&gt;)&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;This will allow us to get the parent node id of the parent child hierarchy.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-kyd4l-HC9bU/UOonnUu_p_I/AAAAAAAAFDM/su2yAJ7w-sg/s1600-h/image%25255B23%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Parent Rank " border="0" alt="Parent Rank " src="http://lh4.ggpht.com/-PLFS5OO5Zpk/UOonoSKYLjI/AAAAAAAAFDU/Hi87_ctRinU/image_thumb%25255B13%25255D.png?imgmax=800" width="404" height="292"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;3) Now, make a calculated column called ParState which will get the Parent State for the current row (based on the ParRnk column).&lt;/font&gt; &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;=CALCULATE (&lt;br&gt;FIRSTNONBLANK ( Table1[State], 1 ),&lt;br&gt;FILTER (&lt;br&gt;ALLEXCEPT ( Table1, Table1[Country] ),&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table1[Rnk] = EARLIER ( Table1[ParRnk] )&lt;br&gt;&amp;nbsp; )&lt;br&gt;)&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-QMCOvYLdMGk/UOono9L46NI/AAAAAAAAFDc/oYQZV0bbJ3A/s1600-h/image%25255B17%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Get value of State for the parent" border="0" alt="Get value of State for the parent" src="http://lh5.ggpht.com/-G1yB-wtUFXI/UOonphisoOI/AAAAAAAAFDk/yZqhlzZjNwY/image_thumb%25255B9%25255D.png?imgmax=800" width="504" height="270"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;4) The final part of the solution is to make the delimited list column by using the path function where State is the child node and ParState is the parent node. But if we directly apply the PATH function in each row, we will not get the intended results as you can see in the image below.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-r2lzXMdZDNo/UOonqWpqgBI/AAAAAAAAFDs/kARNo9hmCZo/s1600-h/image%25255B22%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="PATH() without passing the relevant context" border="0" alt="PATH() without passing the relevant context" src="http://lh3.ggpht.com/-5ASpJWvMKB4/UOonrHwA1jI/AAAAAAAAFD0/UIMg1H4q0lw/image_thumb%25255B12%25255D.png?imgmax=800" width="504" height="219"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;What we need is the delimited list value for the row with the maximum rank in each country applied across all other rows in that country. For that, make a calculated column called ConcatStates with the formula below&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;=CALCULATE (&lt;br&gt;PATH ( Table1[State], Table1[ParState] ),&lt;br&gt;CALCULATETABLE (&lt;br&gt;FILTER ( Table1, Table1[Rnk] = Max ( Table1[Rnk] ) ),&lt;br&gt;ALLEXCEPT ( Table1, Table1[Country] )&lt;br&gt;&amp;nbsp; )&lt;br&gt;)&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Now the results should look like below&lt;/font&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-e-zFzR-F8qo/UOonrZCL3qI/AAAAAAAAFD4/K_5sXc0cOLk/s1600-h/image%25255B26%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="PATH() with the correct table context" border="0" alt="PATH() with the correct table context" src="http://lh6.ggpht.com/-jl8VJ26A8t4/UOonsBxDy6I/AAAAAAAAFEA/FWJUEuw3f28/image_thumb%25255B14%25255D.png?imgmax=800" width="504" height="208"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Now make a new pivot table and drag and drop the Country, ConcatStates and Sales fields to see the intended results&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-cP3ne_XOvSM/UOons6uUjLI/AAAAAAAAFEM/w7LEo5vjmZw/s1600-h/image%25255B30%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="solution" border="0" alt="solution" src="http://lh6.ggpht.com/-s61zA5Ty0uU/UOontRoGIZI/AAAAAAAAFEU/yZx4ttX4FBU/image_thumb%25255B16%25255D.png?imgmax=800" width="504" height="352"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Wasn’t that a fascinating workaround? If you want to play around, you can download the excel file from &lt;a title="Download MultipleRows.xlsx" href="https://docs.google.com/open?id=0B1k6zmQ4NXQlT092TGl6eWwxZUU" target="_blank"&gt;&lt;strong&gt;&lt;u&gt;here&lt;/u&gt;&lt;/strong&gt;&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=gy_Wzw9DtC8:TVLRueOt8Mk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=gy_Wzw9DtC8:TVLRueOt8Mk:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=gy_Wzw9DtC8:TVLRueOt8Mk:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/gy_Wzw9DtC8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/3379443151933241257/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2013/01/group-multiple-rows-to-single-delimited.html#comment-form" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/3379443151933241257?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/3379443151933241257?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/gy_Wzw9DtC8/group-multiple-rows-to-single-delimited.html" title="Group Multiple Rows to Single Delimited Row in PowerPivot" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-me-2hD1_jEo/UOonj63dq9I/AAAAAAAAFCk/yP1RY4IUTxQ/s72-c/image_thumb%25255B1%25255D.png?imgmax=800" height="72" width="72" /><thr:total>5</thr:total><feedburner:origLink>http://www.sqljason.com/2013/01/group-multiple-rows-to-single-delimited.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEcESHY_eip7ImA9WhNUEk4.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-7117164648627750537</id><published>2013-01-03T11:30:00.001-05:00</published><updated>2013-01-03T11:53:29.842-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-03T11:53:29.842-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Personal" /><title>2012 in a Nutshell</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;No, the world didn’t end in 2012 as many expected (looks like the Mayan developer was just damn lazy and decided to take a nap after entering till 2012 in the calendar. Guess who got fired after that!). It took a few days for me to get over the disappointment that I &lt;u&gt;really&lt;/u&gt; have to pay off my car loan now, lucky I didn’t get a Ferrari thinking the world would end. Jokes apart, 2012 has been a good year for me and I thought of noting down a few things that happened over the last year and setting new goals.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-GLvpj5eVmjc/UOWyFo0N76I/AAAAAAAAE_4/xGIAOQdolWs/s1600-h/image%25255B5%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-ldpntiAHn9g/UOWyGp2D0qI/AAAAAAAAFAA/xH411zBi0EI/image_thumb%25255B3%25255D.png?imgmax=800" width="300" height="163"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;font color="#008000"&gt;&lt;strong&gt;1) New blog domain - &lt;a href="http://www.SqlJason.com" target="_blank"&gt;www.SqlJason.com&lt;/a&gt; and Twitter handle – &lt;a href="https://twitter.com/SQLJason" target="_blank"&gt;@SqlJason&lt;/a&gt;&lt;/strong&gt;&lt;/font&gt;&lt;br&gt;I finally took the plunge and bought my blog a new domain. I had been thinking about this for a long time and finally did it in November. This also meant that my blog lost it’s existing page rank and my stats have fallen down, but I guess it is going to pay off in the long run. On the positive side, it’s much easier to communicate my blog url in presentations. So for all my readers, make sure that you update the links from &lt;a href="http://www.road-blogs.blogspot.com"&gt;www.road-blogs.blogspot.com&lt;/a&gt; to &lt;a href="http://www.SqlJason.com"&gt;www.SqlJason.com&lt;/a&gt;. I have set up a redirect from the old url to the new one, so the existing links will also work.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;I also changed my twitter handle from @de_unparagoned to @SqlJason. This means that I don’t get questions anymore on what de_unparagoned means. Also, makes communicating it easier.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;&lt;font color="#008000"&gt;&lt;strong&gt;2) Presentations and Talks&lt;br&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000"&gt;This year was crazy in terms of the presentations that I did. When I came to the US this year, I had a goal to do more presentations than I did in the previous year (which was 2 – one for the London UG and one for SQLBits). Well, I am happy to say that I presented in 8 SQLSaturdays, 1 Code Camp, 1 BI Virtual Chapter and 1 UG.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; Dec 08, 2012 - SQLSaturday #173 (Washington DC 2012)&lt;br&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; Sep 29, 2012 - SQLSaturday #149 (Minnesota 2012)&lt;br&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp; Aug 04, 2012 - SQLSaturday #158 (New York City 2012)&lt;br&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp; Jul 21,&amp;nbsp; 2012 - SQLSaturday #122 (Louisville 2012)&lt;br&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp; Jun 26, 2012 – PASS BI Virtual Chapter (online)&lt;br&gt;6.&amp;nbsp;&amp;nbsp;&amp;nbsp; Jun 09, 2012 - SQLSaturday #121 (Philadelphia 2012)&lt;br&gt;7.&amp;nbsp;&amp;nbsp;&amp;nbsp; May 12, 2012- SQLSaturday #129 (Rochester 2012)&lt;br&gt;8.&amp;nbsp;&amp;nbsp;&amp;nbsp; May 05, 2012- Carolina Code Camp (Charlotte 2012)&lt;br&gt;9.&amp;nbsp;&amp;nbsp;&amp;nbsp; Apr 28, 2012 - SQLSaturday #130 (Jacksonville 2012)&lt;br&gt;10.&amp;nbsp;&amp;nbsp; Apr 21, 2012 - SQLSaturday #118 (Madison 2012)&lt;br&gt;11.&amp;nbsp;&amp;nbsp; Apr 19, 2012 – Charlotte User Group (Charlotte 2012)&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Thanks to all the organizers and attendees, I got a lot of love from all of you and it was a wonderful experience (in fact I got selected at all of the SQL Saturdays that I submitted to). I intend to keep on doing more of SQL Saturdays in 2013 though I am not sure whether I can match up to the previous year because of personal reasons. One of my other goals would be to prepare better and start trying for the big conferences like PASS Summit, PASS BA Conference, etc though I am not sure how that will turn up due to the immense quality of presentations and speakers.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;font color="#008000"&gt;&lt;strong&gt;3) Blogging&lt;/strong&gt;&lt;/font&gt;&lt;br&gt;Blogging has also been pretty consistent and I wrote 33 posts - one more than I did last year. From a numbers perspective, I had 112,614 page views this year (which is a big jump as I just have ~178,000 page views totally) and this is excluding the views that I get from my syndicated posts at other sites like &lt;a href="http://www.BeyondRelational.com"&gt;www.BeyondRelational.com&lt;/a&gt;, &lt;a href="http://www.ssas-info.com"&gt;www.ssas-info.com&lt;/a&gt;, etc. Also, my feedburner reader count has almost doubled to 350+ which is good. My goal for this year would be to write at least one post more than the previous year.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;&lt;font color="#008000"&gt;4) Organized a SQLSaturday and started a new User Group&lt;/font&gt;&lt;/strong&gt;&lt;br&gt;This year, I was able to get more involved with the community and I ended up organizing a &lt;a title="My experience organizing #SQLSat174" href="http://www.sqljason.com/2012/11/sql-saturday-charlotte-journal.html" target="_blank"&gt;SQL Saturday in Charlotte&lt;/a&gt; along with Javier Guillen, Rafael Salas and Melissa Coates. This was a great experience and all of us had a lot of fun doing that. We also started a new BI group in Charlotte - CBIG (&lt;a href="http://www.charbigroup.com" target="_blank"&gt;www.CharBIGroup.com&lt;/a&gt;) and our first meeting will take place next week. If you live in or around Charlotte, make sure that you register and drop in for our fun meetings.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;&lt;font color="#008000"&gt;5) MSDN Forums&lt;/font&gt;&lt;/strong&gt;&lt;br&gt;I started my community involvement through the MSDN forums 3 years back and that is where I discovered my passion for MSBI and community in general. This is one part where I would like to keep going and helping as far as I can. I had set a goal for myself to break the 10,000 points barrierthis year&amp;nbsp; and I am glad to say that I did it by participating in the SSRS, SSAS and PowerPivot forums. &lt;a title="Click to view my profile on MSDN forums" href="http://social.msdn.microsoft.com/Profile/jason%20tom%20thomas" target="_blank"&gt;I got 2300+ points this year (total of 10,100+ points) from 140+ answers&lt;/a&gt; and though it is nowhere near to the points I racked in my first year, I think this is a reasonable target for next year due to the additional community involvement.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#008000" size="2"&gt;&lt;strong&gt;6) PASS Summit&lt;/strong&gt;&lt;br&gt;&lt;font color="#000000"&gt;Attending the PASS Summit was one of my goals e&lt;font color="#000000"&gt;ver since I started knowing about this community, &lt;/font&gt;and again, I am happy to say that I did it this year for the very first time, thanks to my employer – &lt;a href="http://www.mariner-usa.com/" target="_blank"&gt;Mariner&lt;/a&gt;, who sponsored it for me. &lt;a title="Clikc here to read my PASS Summit 2012 experiences" href="http://www.sqljason.com/2012/11/pass-summit-2012-hangover.html" target="_blank"&gt;It was such a wonderful experience meeting #sqlfamily and attending sessions&lt;/a&gt; (in fact I registered for the coming PASS Summit also, which is going to be held in the city that I am based out of - Charlotte).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;&lt;font color="#008000"&gt;7) Certifications – MCSE in SQL Server BI 2012&lt;/font&gt;&lt;/strong&gt;&lt;br&gt;Thanks to the beta invitations, I was able to complete my MCSE certification in BI 2012. There were 5 exams which included some basic DBA&amp;nbsp; topics (which I am not at all familiar with) but guess what, I ended up passing all of those exams in my first try itself. You can read more about my certification experience &lt;a title="My MCSE (SQL Server BI 2012) experience" href="http://www.sqljason.com/2012/07/and-i-am-mcse-in-bi.html" target="_blank"&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;All in all, 2012 was a great year for me and I hope 2013 is going to be kind on me… And also for all of you… &lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=H08CGY6hPgk:U3q4pLISFc8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=H08CGY6hPgk:U3q4pLISFc8:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=H08CGY6hPgk:U3q4pLISFc8:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/H08CGY6hPgk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/7117164648627750537/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2013/01/2012-in-nutshell.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/7117164648627750537?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/7117164648627750537?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/H08CGY6hPgk/2012-in-nutshell.html" title="2012 in a Nutshell" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-ldpntiAHn9g/UOWyGp2D0qI/AAAAAAAAFAA/xH411zBi0EI/s72-c/image_thumb%25255B3%25255D.png?imgmax=800" height="72" width="72" /><thr:total>3</thr:total><feedburner:origLink>http://www.sqljason.com/2013/01/2012-in-nutshell.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQGRXs7cSp7ImA9WhNVGEU.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-2796064873660052840</id><published>2012-12-30T11:18:00.001-05:00</published><updated>2012-12-30T11:18:44.509-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-12-30T11:18:44.509-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SSRS" /><title>Risk Matrix Chart in SSRS</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Of recent, I have been getting mails from my readers whether I have forsaken Reporting Services for Analysis Services in my blog. I want to reassure all of you that this is not the case and that I will be equally focussing on both the technologies. Just that there is a lot of development happening in the AS side and it is very important for all of us to keep on expanding our skillsets and building our expertise. That said, I am writing this post on how to create a Risk Matrix chart in SSRS for all of you guys as a new year gift from my side.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-Kh5NYjnOo7A/UOBpPJkaOlI/AAAAAAAAE8M/CDtkgiz-Qwo/s1600-h/image%25255B4%25255D.png"&gt;&lt;font color="#000000"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Risk Matrix chart in SSRS" border="0" alt="Risk Matrix chart in SSRS" src="http://lh4.ggpht.com/-YSbLsNGjXPM/UOBpP_FwFfI/AAAAAAAAE8U/F8ssfstJhGc/image_thumb%25255B2%25255D.png?imgmax=800" width="500" height="448"&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;A risk matrix chart, as the name suggests, is used for performing risk analysis. Typically, we combine the Likelihood and Impact ratings of an event to arrive upon a risk score, which aids in deciding on what action to take in view of the overall risk. For the purpose of this post, I have just got 3 levels for the Impact and Likelihood (and this can be increased/decreased as per your requirement). For both Likelihood and Impact, a rating of 1 means Low, 2 means Medium and 3 means High. Now I have categorized the risk score into Low, Medium, High &amp;amp; Critical and would like to plot my events as a scatter chart against this. For that, follow the steps below:-&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;1) Create an image with the required risk scores in excel / PowerPoint / Paint. I came up with the following image. &lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-h7ynuwmC_q8/UOBpQXt6aGI/AAAAAAAAE8c/8rnLld7XYAY/s1600-h/image%25255B8%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="background image for SSRS Chart" border="0" alt="background image for SSRS Chart" src="http://lh6.ggpht.com/-Vwzard2I5TI/UOBpQ6XyOTI/AAAAAAAAE8k/SBPbDfPuqDM/image_thumb%25255B4%25255D.png?imgmax=800" width="261" height="261"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;This will server as the background image of our scatter chart. Add this image to the report.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-wWgIPEoSMCU/UOBpRUXMAjI/AAAAAAAAE8s/09ScSOBPOVw/s1600-h/image%25255B19%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Add image to report" border="0" alt="Add image to report" src="http://lh6.ggpht.com/-_mtpZKMaoBw/UOBpRi8rZXI/AAAAAAAAE80/BepoIK1BBbc/image_thumb%25255B9%25255D.png?imgmax=800" width="151" height="133"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;2) Create a report with the required data sources and dataset. In this case, I have just made a sample dataset&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="1"&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Project A' AS Project, 0.5 AS Likelihood, 0.8 AS Impact&lt;br&gt;UNION ALL&lt;br&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Project B' AS Project, 0.8 AS Likelihood, 1.3 AS Impact&lt;br&gt;UNION ALL&lt;br&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Project C' AS Project, 0.9 AS Likelihood, 2.5 AS Impact&lt;br&gt;UNION ALL&lt;br&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Project D' AS Project, 1.4 AS Likelihood, 0.9 AS Impact&lt;br&gt;UNION ALL&lt;br&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Project E' AS Project, 1.5 AS Likelihood, 1.5 AS Impact&lt;br&gt;UNION ALL&lt;br&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Project F' AS Project, 1.2 AS Likelihood, 2.9 AS Impact&lt;br&gt;UNION ALL&lt;br&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Project G' AS Project, 2.1 AS Likelihood, 0.2 AS Impact&lt;br&gt;UNION ALL&lt;br&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Project H' AS Project, 2.4 AS Likelihood, 1.4 AS Impact&lt;br&gt;UNION ALL&lt;br&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Project I' AS Project, 2.7 AS Likelihood, 2.9 AS Impact&lt;br&gt;UNION ALL&lt;br&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Project J' AS Project, 1.6 AS Likelihood, 1.2 AS Impact&lt;br&gt;UNION ALL&lt;br&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Project K' AS Project, 2.2 AS Likelihood, 2.2 AS Impact&lt;br&gt;UNION ALL&lt;br&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Project L' AS Project, 1.1 AS Likelihood, 0.7 AS Impact&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;3) Go to the toolbox and drag and drop a chart item into the report body. Select the chart type as Scatter chart and click on OK.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-M9DI96AfoF8/UOBpSGh052I/AAAAAAAAE88/two2dVQ16Ys/s1600-h/image%25255B12%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="scatter chart in ssrs" border="0" alt="scatter chart in ssrs" src="http://lh6.ggpht.com/-3_BHLkJaydg/UOBpSiZ78zI/AAAAAAAAE9A/wdxzweEs3sQ/image_thumb%25255B6%25255D.png?imgmax=800" width="404" height="365"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;4) Drag and drop Likelihood from the dataset fields list into the Values and then select Impact as the X Value in the chart. Also drop Project field into the Category Group of the chart.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-kpvhJxwKurQ/UOBpS6T5XcI/AAAAAAAAE9M/ywz9qp9aYPA/s1600-h/image%25255B16%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Add x and y values as well as category of scatter chart" border="0" alt="Add x and y values as well as category of scatter chart" src="http://lh5.ggpht.com/-z4heLFv_7Dk/UOBpThhCa4I/AAAAAAAAE9U/JGsxm9vR3xU/image_thumb%25255B8%25255D.png?imgmax=800" width="404" height="298"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;&lt;font color="#000000" size="2"&gt;5) Change the Axis titles to Likelihood and Impact for the Y and X axis respectively. Then go to both of the axis properties, and set the minimum as 0, maximum as 3 and Interval as 1.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/--ONXLuljxrI/UOBpT5fM7FI/AAAAAAAAE9c/SYLBuDc25rM/s1600-h/SNAGHTML108f3df0%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML108f3df0" border="0" alt="SNAGHTML108f3df0" src="http://lh3.ggpht.com/-w2Eove9X7Zo/UOBpUiy0FGI/AAAAAAAAE9k/5ZFAvLnN7xE/SNAGHTML108f3df0_thumb%25255B1%25255D.png?imgmax=800" width="404" height="315"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;6) Now click on the chart area and add the RiskMatrix image as the background image.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-a2IaInxWAZQ/UOBpVHT4wOI/AAAAAAAAE9s/Fx7gnHoFl7Y/s1600-h/SNAGHTML109383b6%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Add background image" border="0" alt="Add background image" src="http://lh3.ggpht.com/-FIj34WYpfzk/UOBpVoQk9FI/AAAAAAAAE90/xqQl2M3qLHA/SNAGHTML109383b6_thumb.png?imgmax=800" width="504" height="251"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;You might also want to hide the major gridlines for the horizontal and vertical axis.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-2YRjkzAj3rA/UOBpWO5we3I/AAAAAAAAE98/xvGgS7w2o_w/s1600-h/image%25255B22%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="remove major gridlines" border="0" alt="remove major gridlines" src="http://lh3.ggpht.com/-dGgTSjv4Nhs/UOBpWgQcwJI/AAAAAAAAE-E/beUiFDrO-RQ/image_thumb%25255B10%25255D.png?imgmax=800" width="275" height="265"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;7) Now with a bit of cosmetic changes to your marker colours, we arrive upon the end result. It is a good practice to enable the tooltips on the points, so that we can just hover our mouse to find out the project names.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-eiq67t39z0M/UOBpW0svMRI/AAAAAAAAE-M/tAD7jjtjYjk/s1600-h/image%25255B26%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Risk matrix chart" border="0" alt="Risk matrix chart" src="http://lh3.ggpht.com/-cqsqHFfgbd0/UOBpXp6EFcI/AAAAAAAAE-U/lRPbbUBddtg/image_thumb%25255B12%25255D.png?imgmax=800" width="504" height="464"&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;The beauty of this approach is that it can be extended to a lot of other scenarios. For eg, I remember using this approach to answer a &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/6450bb17-cbe9-4136-b3ff-76426a602d06/" target="_blank"&gt;scatter chart with four quadrants question in the MSDN forum&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-yBz6C9WNeNQ/UOBpYCq6p7I/AAAAAAAAE-c/uAMxdILYOE4/s1600-h/image%25255B30%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="scatter chart with 4 quadrants" border="0" alt="scatter chart with 4 quadrants" src="http://lh4.ggpht.com/-5g30gKNyuvA/UOBpYuulSsI/AAAAAAAAE-k/PpTeGCdpe3Y/image_thumb%25255B14%25255D.png?imgmax=800" width="504" height="297"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Ok, this is all from me for this year. As for my new year wish, I would like to quote Ann Landers-&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;“Let this coming year be better than all the others. Vow to do some of the things you've always wanted to do but couldn't find the time. Call up a forgotten friend. Drop an old grudge, and replace it with some pleasant memories. Vow not to make a promise you don't think you can keep. Walk tall, and smile more. You'll look ten years younger. Don't be afraid to say, 'I love you'. Say it again. They are the sweetest words in the world.”&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Wishing all of you a very prosperous new year! &lt;/font&gt;&lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://lh5.ggpht.com/-7_b_BmBVGA8/UOBpY-JphdI/AAAAAAAAE-o/ad3Mn240fvk/wlEmoticon-smile%25255B2%25255D.png?imgmax=800"&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=6G7bxc1-AXQ:JcuXPxun42c:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=6G7bxc1-AXQ:JcuXPxun42c:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=6G7bxc1-AXQ:JcuXPxun42c:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/6G7bxc1-AXQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/2796064873660052840/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2012/12/risk-matrix-chart-in-ssrs.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/2796064873660052840?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/2796064873660052840?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/6G7bxc1-AXQ/risk-matrix-chart-in-ssrs.html" title="Risk Matrix Chart in SSRS" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-YSbLsNGjXPM/UOBpP_FwFfI/AAAAAAAAE8U/F8ssfstJhGc/s72-c/image_thumb%25255B2%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.sqljason.com/2012/12/risk-matrix-chart-in-ssrs.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkQCQX4_cCp7ImA9WhNVE0Q.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-2388657937474697247</id><published>2012-12-24T18:03:00.001-05:00</published><updated>2012-12-24T18:06:00.048-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-12-24T18:06:00.048-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Spatial / Map Reports" /><category scheme="http://www.blogger.com/atom/ns#" term="Office 2013" /><title>Introduction to Excel GeoFlow (Beta 1)</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;I have been playing around for a couple of weeks with the beta release of Excel GeoFlow and I&amp;nbsp; have got very mixed feelings about the product. No, I am not trying to be the Grinch in this Christmas season and I must say that I sure do like the direction in which Microsoft and this product is going – just that it is not even half as ready as I would have expected (but to be fair to them, it is just the beta 1 release). That said, there are a couple of features that I am really excited about and I thought of jotting down a quick introduction to GeoFlow for those who are interested. &lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-gH8w6IqF4RE/UNjfD2YpNyI/AAAAAAAAE34/0bXagFe25Yw/s1600-h/image%25255B3%25255D.png"&gt;&lt;font color="#000000" size="2"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-ZFkrNaL8j6k/UNjfEeIYNuI/AAAAAAAAE4A/xS89owxFbvY/image_thumb%25255B1%25255D.png?imgmax=800" width="500" height="170"&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;strong&gt;1) &lt;u&gt;How to get the beta release of GeoFlow&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;br&gt;If you would like to try GeoFlow, send a mail to &lt;/font&gt;&lt;a href="mailto:geoflowbetarequest@microsoft.com" target="_blank"&gt;&lt;font size="2"&gt;geoflowbetarequest@microsoft.com&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt; and wait for the team to respond. You must have Excel 2013 for GeoFlow to work.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;&lt;font color="#008000"&gt;2) &lt;u&gt;Current Limitations&lt;/u&gt;&lt;/font&gt;&lt;/strong&gt;&lt;br&gt;&lt;strong&gt;-&lt;/strong&gt; Related tables are not supported in this release.All the data should be in one table.&lt;br&gt;&lt;strong&gt;-&lt;/strong&gt; Backend data changes are not reflected in the visualization in this release and this will mean deleting and recreating the visualizations.&lt;br&gt;&lt;strong&gt;-&lt;/strong&gt; No Undo/Redo is supported in this release.&lt;br&gt;&lt;strong&gt;-&lt;/strong&gt; No way to slice and dice data within the visualization&lt;br&gt;&lt;strong&gt;-&lt;/strong&gt; No drill down functionalities from a higher level (say, states) to a lower level (say, counties) which is there in tools like Power View.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;&lt;font color="#008000"&gt;3) &lt;u&gt;Create a basic GeoFlow report&lt;/u&gt;&lt;/font&gt;&lt;/strong&gt;&lt;br&gt;GeoFlow requires your data to have some geographical fields in it. It can be in a variety of formats including latitude and longitude, street address, city, zipcode, state, country, etc. Be aware that you will need internet connection for the geocoding to take place. For the purpose of this demo, I have got the population and personal income data by year of all the counties in the United States. Follow the steps below to create a basic GeoFlow report:-&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;a) After installing GeoFlow, you should now be able to see the &lt;strong&gt;3D Map&lt;/strong&gt; button in the &lt;strong&gt;Insert&lt;/strong&gt; tab. Click on any of the cell within the data table and then select the 3D Map button within the Insert tab. Click on the Explore in 3D option as shown in the image below.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-Fd6Mt6KYaGE/UNjfFCkfh4I/AAAAAAAAE4I/JlZNnC92Zzs/s1600-h/1%252520Insert%2525203D%252520Map%252520button%25255B3%25255D.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="1 Insert 3D Map button" border="0" alt="1 Insert 3D Map button" src="http://lh4.ggpht.com/-kwvsosh41PQ/UNjfFrhlg1I/AAAAAAAAE4M/7bjOk0bqnxY/1%252520Insert%2525203D%252520Map%252520button_thumb%25255B1%25255D.jpg?imgmax=800" width="500" height="240"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;b) Choose the geographical field based on which you need the map. In my case, it is the StateName field. Click on &lt;strong&gt;Map It &lt;/strong&gt;button to proceed.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-U2fWTe5yYQY/UNjfGec_LiI/AAAAAAAAE4Y/SkdwErgbrgU/s1600-h/2%252520Choose%252520geo%252520field%25255B4%25255D.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="2 Choose geo field" border="0" alt="2 Choose geo field" src="http://lh4.ggpht.com/-kwfZLgO5Pq4/UNjfG51smaI/AAAAAAAAE4g/vHhwsu7Nsj0/2%252520Choose%252520geo%252520field_thumb%25255B2%25255D.jpg?imgmax=800" width="500" height="350"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;c) Click on the Population field to see the states visualized by this measure.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-5ar3-OHU968/UNjfHZHc3KI/AAAAAAAAE4o/OO509XFky50/s1600-h/3%252520Basic%252520map%252520of%252520population%252520by%252520states%25255B4%25255D.jpg"&gt;&lt;font color="#000000" size="2"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="3 Basic map of population by states" border="0" alt="3 Basic map of population by states" src="http://lh4.ggpht.com/-D9wzOTviDOw/UNjfH6_k9tI/AAAAAAAAE4w/e3mqYCyRDHM/3%252520Basic%252520map%252520of%252520population%252520by%252520states_thumb%25255B2%25255D.jpg?imgmax=800" width="500" height="334"&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;By default, you have got the Column chart visualization (which can be clustered or stacked if a category is present). This can be changed to a bubble map or a heat map visualization also.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-WIl8hPupIII/UNjfIaL4TkI/AAAAAAAAE44/ONZ85jO8swo/s1600-h/4%252520Bubble%252520map%25255B3%25255D.jpg"&gt;&lt;font color="#000000" size="2"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="4 Bubble map" border="0" alt="4 Bubble map" src="http://lh6.ggpht.com/-dat0-pVfmsY/UNjfI4m-7UI/AAAAAAAAE5A/aTtGbOG5_G4/4%252520Bubble%252520map_thumb%25255B1%25255D.jpg?imgmax=800" width="500" height="184"&gt;&lt;/font&gt;&lt;/a&gt;&lt;br&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;&lt;font color="#008000"&gt;4) &lt;u&gt;Navigating the 3D Map&lt;/u&gt;&lt;/font&gt;&lt;/strong&gt;&lt;br&gt;Navigating the 3D map can be tricky so it is useful to know all the navigation features. To use a mouse to navigate in the GeoFlow 3D environment, do any of the following:&lt;br&gt;·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Double click rapidly on any portion in the globe to zoom closer to it.&lt;br&gt;·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Use the scroll wheel on your mouse to zoom in and zoom out.&lt;br&gt;·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Click and drag the globe in any direction to pan without changing the pitch.&lt;br&gt;·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hold the Alt key, and then click and drag to change the pitch.&lt;br&gt;·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If you lose your point of focus, zoom all the way out with the scroll wheel to reset the globe and view.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;To use the Keyboard to navigate in the GeoFlow 3-D environment, do any of the following:&lt;br&gt;·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tap the arrow keys up, down, left and right to pan and spin the globe.&lt;br&gt;·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hold the Alt key and then tap the left and right arrow keys to orbit the current target, or the up and down arrow keys to increase and decrease the camera pitch.&lt;br&gt;·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tap the plus (+) and minus (-) keys to zoom in and out.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;&lt;font color="#008000"&gt;&lt;strong&gt;5) &lt;u&gt;Interesting Features&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;br&gt;&lt;/font&gt;&lt;font color="#000000"&gt;There are quite some interesting features in GeoFlow and these are some of the main ones in my opinion:-&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;&lt;strong&gt;a)&lt;/strong&gt; &lt;strong&gt;&lt;u&gt;Handles multiple geographical levels&lt;/u&gt;&lt;/strong&gt;:- We can add multiple geographical levels to GeoFlow. To add the counties (AreaName field) to our basic report, click on the &lt;strong&gt;Edit &lt;/strong&gt;button in the Layer Manager as shown below.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-IfwutB7uhb8/UNjfJVLky8I/AAAAAAAAE5E/t9q9FMAfJbQ/s1600-h/SNAGHTML5b930dd%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML5b930dd" border="0" alt="SNAGHTML5b930dd" src="http://lh3.ggpht.com/-nK83vA4gErE/UNjfJjXIk5I/AAAAAAAAE5M/YZMFGrifTEQ/SNAGHTML5b930dd_thumb%25255B1%25255D.png?imgmax=800" width="229" height="261"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Then select the AreaName field and map it to the County in &lt;strong&gt;Geography&lt;/strong&gt; section. Then click on &lt;strong&gt;Map It &lt;/strong&gt;button.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-YYDqxmgUuFU/UNjfKP5_UOI/AAAAAAAAE5Y/yINn1ojala0/s1600-h/SNAGHTML5bba4d4%25255B5%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML5bba4d4" border="0" alt="SNAGHTML5bba4d4" src="http://lh6.ggpht.com/-TBD4gUO-XWg/UNjfKsSzRII/AAAAAAAAE5g/RUGpe59nR-Y/SNAGHTML5bba4d4_thumb%25255B2%25255D.png?imgmax=800" width="229" height="362"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;Now you should see the map visualized by counties. It might take some time for all the data to be processed on the map and it depends on the number of rows that you have. When the processing is done, you should see the message as Finished in the green bar below the map.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-JvVDnfR-pRg/UNjfLmzIW9I/AAAAAAAAE5o/BxJsM0yt_fc/s1600-h/SNAGHTML5bdb42f%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML5bdb42f" border="0" alt="SNAGHTML5bdb42f" src="http://lh4.ggpht.com/-GkUQBE7l-Dg/UNjfMSGa_NI/AAAAAAAAE5w/r0pqM58EI6c/SNAGHTML5bdb42f_thumb%25255B1%25255D.png?imgmax=800" width="449" height="261"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;You can easily toggle back to the states by selecting the StateName radio button in the &lt;strong&gt;Map by &lt;/strong&gt;section. However, as I mentioned before, drill downs are not possible (as far as I know in this release). &lt;font color="#ff0000"&gt;Vote to up this request in Connect by clicking &lt;/font&gt;&lt;a href="https://connect.microsoft.com/office/feedback/details/775092/not-able-to-drilldown-in-maps" target="_blank"&gt;&lt;strong&gt;&lt;u&gt;&lt;font color="#0000ff"&gt;here&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/font&gt;&lt;font color="#ff0000"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;&lt;strong&gt;b) &lt;u&gt;Visualizing Data over time&lt;/u&gt;&lt;/strong&gt;:- We can visualize the data over time if we have a date&amp;nbsp; or time field. In my dataset, I have the year but this is not enough as GeoFlow requires a date or time field. So I had to make a new filed called DateYr which converts the year to a date field by adding 1/1/ before every year. &lt;font color="#ff0000"&gt;Vote &lt;/font&gt;&lt;a href="https://connect.microsoft.com/office/feedback/details/775095/not-able-to-visualize-data-over-time-by-year-or-any-level-above-date" target="_blank"&gt;&lt;strong&gt;&lt;font color="#0000ff"&gt;&lt;u&gt;here&lt;/u&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt;&lt;font color="#ff0000"&gt; to up this request to have the time play axis use any level of the time dimension. &lt;font color="#000000"&gt;Now in GeoFlow, drag and drop the DateYr field to the &lt;strong&gt;Time&lt;/strong&gt; section. Now you will get an additional section for time settings which has values like Time Accumulation, Instant and Persist the last. &lt;/font&gt;&lt;br&gt;&lt;a href="http://lh5.ggpht.com/-dzMdvlhyRFs/UNjfNJ0MybI/AAAAAAAAE54/wlsKpKzSgq4/s1600-h/SNAGHTML5cafdfb%25255B5%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML5cafdfb" border="0" alt="SNAGHTML5cafdfb" src="http://lh3.ggpht.com/-RW3FqBr_FAA/UNjfOOMSVaI/AAAAAAAAE6A/MqIN7qGou_w/SNAGHTML5cafdfb_thumb%25255B2%25255D.png?imgmax=800" width="500" height="489"&gt;&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;You can also see the time play axis on the bottom. Click on play and you can see the data changing over time.&lt;/font&gt; &lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;c) &lt;u&gt;Adding Annotations and Textboxes&lt;/u&gt;&lt;/strong&gt;:- This is definitely one of my favourite features. We can now add an annotation to a particular data-point by right clicking on it and then selecting the &lt;strong&gt;Add annotation&lt;/strong&gt; option.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-JzB9RhaNuBM/UNjfOxQHY1I/AAAAAAAAE6I/JIq6ln2ChBY/s1600-h/image%25255B8%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-X0Ff4N8_-AE/UNjfPVoGLiI/AAAAAAAAE6Q/XYOPT-Oo65o/image_thumb%25255B4%25255D.png?imgmax=800" width="500" height="373"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Similarly, you can add a textbox also. The only difference between them is that an annotation is bound to a data point while the textbox is more like a sticky note on the screen. The textbox stays at the same position even when the map is panned or zoomed.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;d) &lt;u&gt;Find a Location&lt;/u&gt;&lt;/strong&gt;:- The find a location feature is pretty handy in case you have a lot of data points and want to directly zoom to a particular location.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-WkqHg98OKTI/UNjfQYSYsrI/AAAAAAAAE6Y/VuAvHADJB4Y/s1600-h/SNAGHTML5ddebe2%25255B5%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML5ddebe2" border="0" alt="SNAGHTML5ddebe2" src="http://lh4.ggpht.com/-1IguXAE1Mh4/UNjfRV5qsjI/AAAAAAAAE6g/0qaf7Uvc61g/SNAGHTML5ddebe2_thumb%25255B2%25255D.png?imgmax=800" width="500" height="498"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;&lt;strong&gt;e) &lt;u&gt;Creating and Saving Tours&lt;/u&gt;&lt;/strong&gt;:- I have obviously saved the most exciting feature for the last. Now you can create tours by clicking on the &lt;strong&gt;New Tour &lt;/strong&gt;button and then including the scenes in the tour by selecting the &lt;strong&gt;Capture Scene&lt;/strong&gt; button.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-ndb4vgyg1EE/UNjfR_53BGI/AAAAAAAAE6o/Y1J8FkZ4JM4/s1600-h/SNAGHTML600fded%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML600fded" border="0" alt="SNAGHTML600fded" src="http://lh3.ggpht.com/-lQsBksaKvZk/UNjfSYhd-cI/AAAAAAAAE6w/-TFy0cJY_TQ/SNAGHTML600fded_thumb%25255B1%25255D.png?imgmax=800" width="500" height="123"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Scenes will transition automatically and effects are automatically applied. A scene is auto-saved when you capture a new scene. If you want to change a scene, for example if you want the scene to show a different angle or a different time subset, select the scene, make the changes and then click on &lt;b&gt;Save Scene, &lt;/b&gt;Once you have created a tour, you can play it by selecting the &lt;strong&gt;Play Tour &lt;/strong&gt;button. I have posted a video of a sample tour that I created.&lt;/font&gt;&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:b515e511-91d5-4433-82e6-78f4c33adc66" class="wlWriterEditableSmartContent"&gt;&lt;div&gt;&lt;object width="448" height="252"&gt;&lt;param name="movie" value="http://www.youtube.com/v/fQTCgprFArM?hl=en&amp;amp;hd=1"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/fQTCgprFArM?hl=en&amp;amp;hd=1" type="application/x-shockwave-flash" width="448" height="252"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div style="width:448px;clear:both;font-size:.8em"&gt;Excel GeoFlow&lt;/div&gt;&lt;/div&gt;  &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;After creating a tour in GeoFlow, the tour is automatically saved back to your workbook. You can create multiple tours by clicking on &lt;b&gt;New Tour&lt;/b&gt;. Saving your Excel workbook will save each of the GeoFlow tours you created with the worksheet it was created from. Now you will be able to see a new option to &lt;strong&gt;Manage Tours &lt;/strong&gt;also.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-5DGZmQ9C9sM/UNjfS2HZCFI/AAAAAAAAE64/wJeD_AVj7sM/s1600-h/SNAGHTML6063add%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML6063add" border="0" alt="SNAGHTML6063add" src="http://lh5.ggpht.com/-tRrt8_6Dl7w/UNjfTbAvSpI/AAAAAAAAE7A/rd1RJIGsxXs/SNAGHTML6063add_thumb%25255B1%25255D.png?imgmax=800" width="500" height="138"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;To summarize, there are some exciting features but clearly, a lot of work needs to be done before it can be used by data professionals for analysis. With this, we come to the end of today’s post. Wishing all of you a very Merry Christmas from my side and be good!&lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=TsIDqexRbrQ:Pw3_uzROmvM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=TsIDqexRbrQ:Pw3_uzROmvM:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=TsIDqexRbrQ:Pw3_uzROmvM:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/TsIDqexRbrQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/2388657937474697247/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2012/12/introduction-to-excel-geoflow-beta-1.html#comment-form" title="13 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/2388657937474697247?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/2388657937474697247?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/TsIDqexRbrQ/introduction-to-excel-geoflow-beta-1.html" title="Introduction to Excel GeoFlow (Beta 1)" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-ZFkrNaL8j6k/UNjfEeIYNuI/AAAAAAAAE4A/xS89owxFbvY/s72-c/image_thumb%25255B1%25255D.png?imgmax=800" height="72" width="72" /><thr:total>13</thr:total><feedburner:origLink>http://www.sqljason.com/2012/12/introduction-to-excel-geoflow-beta-1.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE4AQXs-eSp7ImA9WhNUEkg.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-3193045419382077514</id><published>2012-12-02T11:08:00.001-05:00</published><updated>2013-01-03T18:49:00.551-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-03T18:49:00.551-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Syndicated" /><category scheme="http://www.blogger.com/atom/ns#" term="DAXMD" /><category scheme="http://www.blogger.com/atom/ns#" term="SSAS" /><category scheme="http://www.blogger.com/atom/ns#" term="DAX" /><title>Querying Attributes and Measures in DAX Multidimensional</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;The past week has been pretty exciting for Analysis Services geeks - Microsoft SQL Server 2012 With Power View For Multidimensional Models Customer Technology Preview (CTP) has been made available for download (and if you haven’t tried it out yet, download it from this &lt;strong&gt;&lt;a title="Download Microsoft SQL Server 2012 With Power View For Multidimensional Models Customer Technology Preview (CTP)" href="http://www.microsoft.com/en-us/download/details.aspx?id=35822" target="_blank"&gt;link&lt;/a&gt;&lt;/strong&gt;). Now the obvious part is that Power View can consume data from SSAS Multidimensional objects now and that was a long time request from the community. This will enable the business to use their existing investments in SSAS Multidimensional to utilize the latest end user tools like Power View. The best part is that all this is achieved through native support for DAX in Multidimensional and there is no translation of DAX into MDX. Now this opens up a whole new door of possibilities. For eg, we should be able to design SSRS reports using DAX queries on top of SSAS Multidimensional objects (and who knows, we might be able to replace some of the slower MDX calculations with faster DAX equivalents). Welcome to the world of DAX Multidimensional (or DAXMD)!&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-zWlHdqAepNU/UOYY6JI6y_I/AAAAAAAAFBM/NqOpOZ7j90w/s1600-h/image2.png"&gt;&lt;font color="#000000" size="2"&gt;&lt;a href="http://lh5.ggpht.com/-zWlHdqAepNU/UOYY6JI6y_I/AAAAAAAAFBU/GuLADnzCPyw/s1600-h/image4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="Querying in DAXMD" border="0" alt="Querying in DAXMD" src="http://lh5.ggpht.com/-D1eL7X95QFU/ULt8m2HSnwI/AAAAAAAAEwE/L0moTkwzXDo/image_thumb%25255B2%25255D.png?imgmax=800" width="504" height="155"&gt;&lt;/a&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Now the purpose of this post is to introduce you on how to query Multidimensional objects in DAX, and you should be able to get a good overview on how the multidimensional objects are mapped in tabular from &lt;u&gt;&lt;strong&gt;&lt;a title="Power View for Multidimensional Models Overview" href="http://social.technet.microsoft.com/wiki/contents/articles/14701.power-view-for-multidimensional-models-overview.aspx" target="_blank"&gt;here&lt;/a&gt;&lt;/strong&gt;&lt;/u&gt;. But there is something extra in this blog that the official documentation has not mentioned when it comes to querying attributes which don't have the same name and key values (for SSAS beginners, an attribute in SSAS MD can have different values for it’s key and name, while in SSAS Tabular, you have to specify the key and name as different columns). For the purpose of this post, I am using the &lt;strong&gt;Adventure Works DW 2008R2 &lt;/strong&gt;database and querying using SQL Server Data Tools (SSDT). &lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Before we start, lets have a look at the summary &lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-2Axix9xhPvo/ULt8nKxIGLI/AAAAAAAAEwM/pK-lZFeYZM4/s1600-h/image%25255B11%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Object mapping summary - MD to Tabular" border="0" alt="Object mapping summary - MD to Tabular" src="http://lh4.ggpht.com/-t0RLrnrN10Q/ULt8nyjB84I/AAAAAAAAEwU/3St4kc_Cg5M/image_thumb%25255B7%25255D.png?imgmax=800" width="500" height="351"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Armed with this knowledge, let us start querying in DAXMD&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;1) &lt;u&gt;Querying Attributes with same Key and Name&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Let us take the example of Calendar Quarter of Year in the Date dimension&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-tWHnFeoG-sY/ULt8oWy_INI/AAAAAAAAEwc/WWFp41GL_AA/s1600-h/image%25255B14%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Calendar Quarter of Year" border="0" alt="Calendar Quarter of Year" src="http://lh3.ggpht.com/-rxpsEzUvxAY/ULt8pPg7ryI/AAAAAAAAEwk/Igrf_2KRvss/image_thumb%25255B8%25255D.png?imgmax=800" width="504" height="242"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;We can write a simple DAX query as shown below&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;strong&gt;evaluate&lt;br&gt;values ('Date'[Calendar Quarter of Year])&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-7V-RYjPEyM4/ULt8p__hy1I/AAAAAAAAEws/PQuawipJXkw/s1600-h/image%25255B17%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Querying Calendar Quarter of Year" border="0" alt="Querying Calendar Quarter of Year" src="http://lh5.ggpht.com/-T96vuroB1Bk/ULt8qzkmhUI/AAAAAAAAEw0/btMng2nTUW4/image_thumb%25255B9%25255D.png?imgmax=800" width="335" height="224"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Note that Date is a role playing dimension in the cube and you will need to use the name of the cube dimension as the table name (and not the database dimension name).&lt;/font&gt; &lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;2) &lt;u&gt;Querying Attributes with different Key and Name&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;Let us take the example of Calendar Year.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-yNhzyxA8TnU/ULt8rYaxVAI/AAAAAAAAEw8/Ayuo6OvcdmE/s1600-h/image%25255B20%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Querying Calendar Year" border="0" alt="Querying Calendar Year" src="http://lh5.ggpht.com/-3BXFkVl41To/ULt8sYlc7KI/AAAAAAAAExE/HOpeNQ5SPJo/image_thumb%25255B10%25255D.png?imgmax=800" width="504" height="247"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Now let us see what the query below will result in.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;strong&gt;evaluate&lt;br&gt;values ('Date'[Calendar Year])&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;We will get an error - &lt;font color="#ff0000"&gt;Column [Calendar Year] is part of composite key, but not all columns of the composite key are included in the expression or its dependent expression.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-_ZMSRqq7cTs/ULt8tH-i0ZI/AAAAAAAAExI/HxZrPSxGeig/s1600-h/image%25255B23%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Composite Key Error in Dax" border="0" alt="Composite Key Error in Dax" src="http://lh3.ggpht.com/-li3OJb7yzZU/ULt8trhtDBI/AAAAAAAAExU/qvQm85sqDhE/image_thumb%25255B11%25255D.png?imgmax=800" width="504" height="77"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;I spent hours trying to figure out what this error means and finally managed to figured out that it happens only when the key and names are different. It made sense also as DAXMD will only recognize the single attribute as two different columns and not as one. But I had no idea of what syntax too use. Enter &lt;strong&gt;Jeffrey Wang&lt;/strong&gt; (&lt;/font&gt;&lt;a title="MDX and DAX topics" href="http://mdxdax.blogspot.com/" target="_blank"&gt;&lt;font color="#0000ff" size="2"&gt;blog&lt;/font&gt;&lt;/a&gt;&lt;font color="#000000" size="2"&gt;) from the Anaysis Services Dev team -&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;“ &lt;/font&gt;&lt;font color="#000000"&gt;&lt;em&gt;This is a design decision for good performance. A single MDX attribute can produce several DAX columns, some visible, some not, but you can query them in SSMS regardless whether they are visible or not. In general, a MDX attribute, named A, can produce several columns like A.Key0, A.Key1, A. The design requires you to group by at least A.Key0 and A.Key1 if you want to group by any of the three columns. So to query attribute A in DAX, you can do either Summarize('Table', [A.Key0], [A.Key1]) or Summarize('Table', [A.Key0], [A.Key1], [A]). In simple cases where an attribute, named B, only generates a single DAX column, which will also be named B, you can simply query Values([B]) like regular tabular columns.&lt;br&gt;This constraint helps us achieve good performance since we can send all queries to the MDX engine which only groups by the entire attribute regardless how many DSV columns were used to create this attribute. Otherwise we would have to eliminate duplicate values on the DAX side after MDX query returns the resultset. Hope this makes sense.&lt;/em&gt; “&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;What this means is that your query will have to follow the below format&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;strong&gt;evaluate&lt;br&gt;summarize('Date', 'Date'[Calendar Year.Key0], 'Date'[Calendar Year])&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-oj-wUUZEnnQ/ULt8ulRzt7I/AAAAAAAAExc/CwdnTyvfD0w/s1600-h/image%25255B26%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Querying Calendar Year the right way" border="0" alt="Querying Calendar Year the right way" src="http://lh5.ggpht.com/-RDR8tJ9Y4jo/ULt8vRdY2KI/AAAAAAAAExk/-tQKrBayYCM/image_thumb%25255B12%25255D.png?imgmax=800" width="504" height="231"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;font color="#333333"&gt;&lt;/font&gt;&lt;font color="#000000"&gt;Adding the .Key format to the column name is a new addition to the DAX language as far as I know. I am reasonably sure that this would be how Power View also issues the DAX when such attributes are used in the model, though I haven’t tested it so far. If anyone of you have seen the profiler traces of Power View, feel free to comment below and add.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;3) &lt;u&gt;Querying Attributes with Multiple Keys&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;Let us take the example of Calendar Quarter.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-gsszC4IvcUo/ULt8wzojbVI/AAAAAAAAExs/L-qGo62n37s/s1600-h/image%25255B29%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Calendar Quarter" border="0" alt="Calendar Quarter" src="http://lh4.ggpht.com/-jRXwMWcZuP4/ULt8xiNaaHI/AAAAAAAAEx0/CgOZJoFfIR0/image_thumb%25255B13%25255D.png?imgmax=800" width="504" height="238"&gt;&lt;/a&gt;&lt;font color="#9b00d3"&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;font color="#000000"&gt;As mentioned previously, we will have to group by all the keys at least and then the name, if needed.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;font color="#9b00d3" size="2"&gt;evaluate&lt;br&gt;summarize('Date', &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Date'[Calendar Quarter.Key0],&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Date'[Calendar Quarter.Key1], &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Date'[Calendar Quarter])&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-FMreUnssVFE/ULt8ym6a3aI/AAAAAAAAEx8/_e1c1M6ZNJI/s1600-h/image%25255B33%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Querying Calendar Quarter" border="0" alt="Querying Calendar Quarter" src="http://lh4.ggpht.com/-rOlWmao8DbI/ULt8zrkG7mI/AAAAAAAAEyE/dRTE1gyDoyM/image_thumb%25255B15%25255D.png?imgmax=800" width="304" height="390"&gt;&lt;/a&gt;&lt;br&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;4) &lt;u&gt;Querying Measures in a Measure Group&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;Let us take the example of Internet Sales Amount in the Internet Sales measure group.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-hlJ-xvOaEZ4/ULt80ftaP3I/AAAAAAAAEyM/bDwPBI5d1h4/s1600-h/image%25255B36%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Internet Sales Amount" border="0" alt="Internet Sales Amount" src="http://lh5.ggpht.com/-CTCrepQ0QPE/ULt81RkQ5zI/AAAAAAAAEyU/Oi2YW2gWHRc/image_thumb%25255B16%25255D.png?imgmax=800" width="268" height="255"&gt;&lt;/a&gt;&lt;/p&gt;&lt;font color="#9b00d3"&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;We can just write a simple DAX query to display the Internet Sales measure group by Calendar Quarter of Year as shown below&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;strong&gt;evaluate &lt;br&gt;summarize('Date',&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Date'[Calendar Quarter of Year], &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "test", 'Internet Sales'[Internet Sales Amount])&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-J8g8qkZwVn0/ULt810C1gCI/AAAAAAAAEyY/d6_ePoj1gSA/s1600-h/image%25255B39%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Querying Internet Sales Amount" border="0" alt="Querying Internet Sales Amount" src="http://lh5.ggpht.com/-TuOUQ8a5rmk/ULt82XkE30I/AAAAAAAAEyk/J45iSofOysQ/image_thumb%25255B17%25255D.png?imgmax=800" width="504" height="147"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;We can also refer to the measure without the table name in the query. Also note that we don’t need to provide any aggregation to the measure, else we might get the following error - &lt;font color="#ff0000"&gt;Column 'Internet Sales Amount' in table 'Internet Sales' cannot be found or may not be used in this expression&lt;/font&gt;&lt;font color="#000000"&gt;. This makes sense also as the engine should use the aggregation that is defined in the multidimensional cube.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;5) &lt;u&gt;Querying Measures without a Measure Group&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;This section refers to those calculated measures that are made in the multidimensional cube which are not associated with a measure group. Since all the calculated measures in Adventure Works cube are associated with some or the other measure group, I made a simple calculated measure called test in the calculated member script of the cube as shown below&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;strong&gt;Create Member CurrentCube.[Measures].[Test]&amp;nbsp;&amp;nbsp;&amp;nbsp; As&amp;nbsp; 2;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Now I can refer to this Test measure in a DAX query as shown below&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;strong&gt;evaluate&lt;br&gt;summarize('Date',&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Date'[Calendar Quarter of Year], &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "test", 'Measures'[Test])&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-FIub2DW1Veo/ULt83zB6HsI/AAAAAAAAEys/AgQ4uZucze0/s1600-h/image%25255B45%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Querying custom measure" border="0" alt="Querying custom measure" src="http://lh5.ggpht.com/-EmcmoKGMwGU/ULt84mYDnpI/AAAAAAAAEy0/ROW7rX-ahbA/image_thumb%25255B19%25255D.png?imgmax=800" width="504" height="176"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Hopefully, this should get you started thinking in DAXMD now! &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://lh5.ggpht.com/-lJI7BCVw02Q/ULt85dxQ1LI/AAAAAAAAEy8/SwZFs_F-qBs/wlEmoticon-smile%25255B2%25255D.png?imgmax=800"&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;strong&gt;&lt;u&gt;Update 3/1/2013&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;On the same vein, Gerhard Brueckl has blogged on &lt;a title="Click to read Gerhard's post" href="http://gbrueckl.wordpress.com/2013/01/03/daxmd-and-defaultmembers/" target="_blank"&gt;DAXMD and Default Members&lt;/a&gt;. Interesting read, check it out! &lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=Ar3Wr1L-NeU:BeBQdkTTv9Q:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=Ar3Wr1L-NeU:BeBQdkTTv9Q:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=Ar3Wr1L-NeU:BeBQdkTTv9Q:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/Ar3Wr1L-NeU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/3193045419382077514/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2012/12/querying-attributes-and-measures-in-dax.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/3193045419382077514?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/3193045419382077514?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/Ar3Wr1L-NeU/querying-attributes-and-measures-in-dax.html" title="Querying Attributes and Measures in DAX Multidimensional" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-D1eL7X95QFU/ULt8m2HSnwI/AAAAAAAAEwE/L0moTkwzXDo/s72-c/image_thumb%25255B2%25255D.png?imgmax=800" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://www.sqljason.com/2012/12/querying-attributes-and-measures-in-dax.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUMQns6eSp7ImA9WhNXEE8.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-467517755605791832</id><published>2012-11-27T09:10:00.000-05:00</published><updated>2012-11-27T09:24:43.511-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-27T09:24:43.511-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PowerPivot" /><category scheme="http://www.blogger.com/atom/ns#" term="DAX" /><title>Classifying and Solving the Events in Progress Problem in PowerPivot</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Last week, I was going through the PowerPivot forums as usual and was answering a question on &lt;a title="MSDN forum : How to handle count of data with &amp;ldquo;valid to/from&amp;rdquo; dates in DAX" href="http://social.msdn.microsoft.com/Forums/en-US/sqlkjpowerpivotforexcel/thread/4296389a-2155-4c53-96f0-79747553233c/#703d29d7-484f-4152-ab71-3b03b8e8bca5" target="_blank"&gt;How to handle count of data with “valid to/from” dates in DAX&lt;/a&gt;. This was a classic case of the “Events in Progress” or finding the number of active events between a start date and an end date (In case you haven’t read, Chris Webb (&lt;a href="http://cwebbbi.wordpress.com" target="_blank"&gt;blog&lt;/a&gt; | &lt;a href="https://twitter.com/Technitrain" target="_blank"&gt;twitter&lt;/a&gt;) has got some great posts on the &lt;a title="Click here to view the posts" href="http://cwebbbi.wordpress.com/?s=events+in+progress" target="_blank"&gt;Events in Progress&lt;/a&gt; solutions using both DAX and MDX). I replied back with a possible solution and soon, Marco Russo (&lt;a href="http://www.sqlbi.com/articles/all/" target="_blank"&gt;blog&lt;/a&gt; | &lt;a href="https://twitter.com/marcorus" target="_blank"&gt;twitter&lt;/a&gt;) came up with a much more elegant solution. But more than the solution, what caught my eye was that our results were not matching and after a few email exchanges with Marco (and a big thanks to Marco for taking time off to answer my questions), we came up to the conclusion that it was because of the difference in our interpretations of the Event in Progress. That is when I thought of classifying the different interpretations of the “Events in Progress” as well as extending Marco’s solution for the same.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-aVSEGe5Rj3E/ULSlGi4PjiI/AAAAAAAAEtA/SJMYpFMkis4/s1600-h/image%25255B7%25255D.png"&gt;&lt;font color="#000000" size="2"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-PmFOCjwuNC8/ULSlHriMGqI/AAAAAAAAEtI/yx3JN2WluyE/image_thumb%25255B3%25255D.png?imgmax=800" width="407" height="261"&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;In a typical Events in Progress problem, there are fact rows with a start and end date and each row denotes an event. The requirement would be to find the number of events that were in progress on any given date. At a date level, there is no ambiguity as the number of events in progress for a particular day, say D would be the number of those events whose start date is less than or equal to D and the end date is greater than or equal to D (Actually, you can further sub-categorize this into whether the start dates and end dates are inclusive or exclusive i.e. whether the start date is &lt;em&gt;&lt;u&gt;less than&lt;/u&gt; &lt;/em&gt;or &lt;em&gt;&lt;u&gt;less than or equal&lt;/u&gt;&lt;/em&gt; to D and whether end date is &lt;em&gt;&lt;u&gt;greater than&lt;/u&gt;&lt;/em&gt; or &lt;em&gt;&lt;u&gt;greater than or equal&lt;/u&gt;&lt;/em&gt; to D. For the sake of simplicity, we are assuming that both start and end dates are inclusive). However, the moment you start analysing on a level above the dates, say a month or a year, the question arises on which date of the month to use for comparing the start and end date. Should we be using the first date of the month? Or the last date of the month? Or should we be using a combination of both? There is no wrong answer here and the right definition completely depends on the business requirement. So let us look at the four possible combinations that are possible:-&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-fvuXan4P1m8/ULSlIfQpPiI/AAAAAAAAEtQ/9T9Hel61jOU/s1600-h/image%25255B21%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/--3V1fBv2bjg/ULSlJYufpBI/AAAAAAAAEtY/w1VnhHvxvRQ/image_thumb%25255B11%25255D.png?imgmax=800" width="600" height="124"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;To give an example, say we are analysing the events in progress for January 2012. For Scenario S2, this would mean the number of events which have a From Date (or start date) less than or equal to January 1 2012 (which is the minimum date for January 2012) and To Date (or end date) greater than or equal to 31 January 2012 (which is the maximum date for the January 2012). Here also, we can further sub-categorize whether the start and end dates are inclusive or exclusive but this is not done for the sake of simplicity and also because our solution can easily be modified by removing the equal to symbol. &lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;It might be easier to understand the relationship between the four scenarios with the help of a Venn Diagram.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-fX0wxQH0JDg/ULSlKOazwII/AAAAAAAAEtg/0WaJ8rkrfAQ/s1600-h/image%25255B26%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-saa8IaCB8mg/ULSlKrgpRHI/AAAAAAAAEto/0Uf0xtUBdyA/image_thumb%25255B14%25255D.png?imgmax=800" width="400" height="400"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;As you can see, Scenario S3 is the superset and includes any event that was active on any date in the selected time period. Scenario S1 requires that the event started before the time period but can end during any day on or after the time period. Conversely, scenario S4 requires that the event started on or before the time period and ends on any day after the time period. Scenario S2 is the intersection of the scenarios S1 and S4 and requires that the event starts before the time period and ends after the time period. This means that those events starting or ending in the selected time period will not be counted.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Lets have a look at the four scenarios from a different visualization perspective.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-a72stzwDI-E/ULSlLKK_7UI/AAAAAAAAEtw/A_wA0Dbe6sI/s1600-h/image%25255B35%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-631lBQll7iQ/ULSlL25JPhI/AAAAAAAAEt4/x6D15veQA-U/image_thumb%25255B19%25255D.png?imgmax=800" width="500" height="349"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Now that you have got a good idea of the different scenarios, let us look at some sample data that we can use for testing the solution. Given below is a simple fact table which contains Order Numbers with a From Date and To Date and also the Order quantity.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-Ayc2Pqa2WG4/ULSlMoaQWTI/AAAAAAAAEuA/9ZCpohcNW6o/s1600-h/image%25255B44%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-wftFElF45q0/ULSlNVzQ19I/AAAAAAAAEuI/cg6lgxZ63h4/image_thumb%25255B22%25255D.png?imgmax=800" width="504" height="136"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;The PowerPivot data model that we are going to use is given below&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-ItYJqf6Uo2c/ULSlN4cKp_I/AAAAAAAAEuQ/_vlqvGA4TY4/s1600-h/1%252520PowerPivot%252520model%25255B3%25255D.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="1 PowerPivot model" border="0" alt="1 PowerPivot model" src="http://lh4.ggpht.com/-LEzijocn65A/ULSlO1hUiQI/AAAAAAAAEuY/naQdXN5IVMA/1%252520PowerPivot%252520model_thumb%25255B1%25255D.jpg?imgmax=800" width="404" height="312"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;I just have a simple calendar table (where I have just populated days from 2011 to 2013, again for simplicity) and the above Orders fact table. It is interesting to note that &lt;u&gt;we will not be creating any relationships between the two tables&lt;/u&gt; as our solution does not require them. Now follow the steps below to get the solution for the four scenarios:-&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;1) Before we start, it might be a good exercise to review the original formula that I wrote and why we are moving to a different solution. The original formula I wrote was&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;strong&gt;OldMsr&lt;/strong&gt;:=&lt;font color="#000000"&gt;&lt;font style="background-color: #ff0000"&gt;Calculate (&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CountRows ( Fct ),&lt;br&gt;&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#000000"&gt;&lt;font style="background-color: #ffc000"&gt;Filter (&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fct,&lt;/font&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#000000"&gt;&lt;font style="background-color: #ffff00"&gt;CountRows (&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Filter (&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Values ( Calendar[DateKey] ),&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( Calendar[DateKey] &amp;gt;= VALUE ( Fct[FromDate] )&amp;nbsp; ) &amp;amp;&amp;amp; ( Calendar[DateKey] &amp;lt;= VALUE ( Fct[ToDate] ) )&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;br&gt;&lt;/font&gt;&lt;font style="background-color: #ffff00"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/font&gt; &lt;/font&gt;&lt;font color="#000000"&gt;&lt;font style="background-color: #ffc000"&gt;&amp;gt; 0&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;br&gt;&lt;/font&gt;&lt;font style="background-color: #ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;To explain this formula, I am dividing it into 3 parts. The red highlighted area gives us the count of the fact rows which is the count of events in progress, provided the correct set of rows in the Fact table is passed as a table filter. Now to pass the correct table filter, we need to filter the fact table which is the part highlighted in orange and the condition to filter it is highlighted in yellow.&amp;nbsp; Since we don't have any relations between the tables, what I am doing is to filter all the fact rows which has at least one row where there is a date greater than the From Date but less than the To Date. When we are analysing by month, what this will mean is that even if there is a single day in that month which satisfies the condition, include that fact row. This is exactly similar to our scenario S3.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Now some of the problems associated with this:-&lt;br&gt;- Formula is difficult to understand and write&lt;br&gt;- Formula can’t be easily changed to that of other scenarios&lt;br&gt;- Formula doesn’t perform well&lt;/font&gt; &lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;2) Now let us look at the formula which was given by Marco in the forums&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;strong&gt;S3&lt;/strong&gt;:= Calculate (&lt;br&gt;&amp;nbsp; CountRows ( Fct ),&lt;br&gt;&amp;nbsp; Filter (Values ( Fct[FromDate] ), Fct[FromDate] &amp;lt;= Max ( Calendar[DateKey] )&amp;nbsp; ),&lt;br&gt;&amp;nbsp; Filter (Values ( Fct[ToDate] ), Fct[ToDate] &amp;gt;= Min ( Calendar[DateKey] )&amp;nbsp; )&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;You can already see how simple it is to understand. We are just passing the From dates which are less than the max of the time period and those To Dates which are greater than min of the time period as a table filter to the calculate statement and there is no need to filter the fact table explicitly. Not only that, it performs much better as it doesn’t have to parse through the entire fact table and just has to parse through two tables having the distinct values of From Date and To Date respectively (Always remember, it is faster to parse through two smaller tables than one big table). Now the best part is that this can be easily extended to the other scenarios as shown below&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;strong&gt;S1&lt;/strong&gt;:= Calculate (&lt;br&gt;CountRows ( Fct ),&lt;br&gt;Filter (Values ( Fct[FromDate] ), Fct[FromDate] &amp;lt;= Min ( Calendar[DateKey] ) ),&lt;br&gt;Filter (Values ( Fct[ToDate] ), Fct[ToDate] &amp;gt;= Min ( Calendar[DateKey] ) )&lt;br&gt;)&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;strong&gt;S2&lt;/strong&gt;:= Calculate (&lt;br&gt;CountRows ( Fct ),&lt;br&gt;Filter (Values ( Fct[FromDate] ), Fct[FromDate] &amp;lt;= Min ( Calendar[DateKey] ) ),&lt;br&gt;Filter (Values ( Fct[ToDate] ), Fct[ToDate] &amp;gt;= Max ( Calendar[DateKey] ) )&lt;br&gt;)&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;strong&gt;S4&lt;/strong&gt;:= Calculate (&lt;br&gt;CountRows ( Fct ),&lt;br&gt;Filter (Values ( Fct[FromDate] ), Fct[FromDate] &amp;lt;= Max ( Calendar[DateKey] ) ),&lt;br&gt;Filter (Values ( Fct[ToDate] ), Fct[ToDate] &amp;gt;= Max ( Calendar[DateKey] ) )&lt;br&gt;)&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;Wasn’t that simple?&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;3) Now let us have a look at the results to make sure everything is coming correctly.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-GeEFj53CCOM/ULSlPRGjXQI/AAAAAAAAEug/4n2woBqkTjU/s1600-h/image%25255B52%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-vaDg7gFw3YQ/ULSlQlr1J_I/AAAAAAAAEuo/z4Ya1kvMAmw/image_thumb%25255B33%25255D.png?imgmax=800" width="253" height="452"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;I have filtered for January 2012 and you can see that the dates in that table are showing the same values for all the five measures. Let us pick 10 January 2012 as an example. Only 11001, 11003 and 11004 suffice the conditions and hence the measures are all 3. The results come up correctly even if we look at a month or year level.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-1-OCXJZTrWI/ULSlRQHgwfI/AAAAAAAAEuw/643BGVSARJ4/s1600-h/image%25255B58%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-WYtyVMoo1YI/ULSlSd1jVdI/AAAAAAAAEu4/MGkFZ6XSsdo/image_thumb%25255B40%25255D.png?imgmax=800" width="250" height="467"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Let us take January 2012 as an example, so the max will be 31 Jan 2012 and minimum will be 1 Jan 2012. The order numbers which match the given conditions are given below and matches with the measure counts&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;S1 = 11001, 11002, 11003&lt;br&gt;S2 = 11001, 11003&lt;br&gt;S3 = 11001, 11002, 11003, 11004, 11005, 11006&lt;br&gt;S4 = 11001, 11003. 11006&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;4) Another benefit of this pattern is that it can easily be applied to other problems where you might need to find the sum or distinct count or any other aggregations between a from date and to date. Let us say, if I want to find the sum of Order Quantity between the from date and to date according to scenario S1, all I need to do is as follows&lt;/font&gt;&lt;/p&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;strong&gt;S1Sum&lt;/strong&gt;:= Calculate (&lt;br&gt;&lt;font style="background-color: #ffff00"&gt;Sum ( Fct[OrderQty] )&lt;/font&gt;,&lt;br&gt;Filter (Values ( Fct[FromDate] ), Fct[FromDate] &amp;lt;= Min ( Calendar[DateKey] ) ),&lt;br&gt;Filter (Values ( Fct[ToDate] ), Fct[ToDate] &amp;gt;= Min ( Calendar[DateKey] ) )&lt;br&gt;)&lt;/font&gt;  &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;If you want to try this on your own, feel free to download the completed excel file from &lt;a title="Download BetweenDates.xlsx" href="https://docs.google.com/open?id=0B1k6zmQ4NXQlbkVrb3YydnI1MTQ" target="_blank"&gt;&lt;strong&gt;&lt;u&gt;here&lt;/u&gt;&lt;/strong&gt;&lt;/a&gt;. &lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=_M_k6iA_No8:6lPrfE6KHDg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=_M_k6iA_No8:6lPrfE6KHDg:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=_M_k6iA_No8:6lPrfE6KHDg:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/_M_k6iA_No8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/467517755605791832/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2012/11/classifying-and-solving-events-in.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/467517755605791832?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/467517755605791832?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/_M_k6iA_No8/classifying-and-solving-events-in.html" title="Classifying and Solving the Events in Progress Problem in PowerPivot" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-PmFOCjwuNC8/ULSlHriMGqI/AAAAAAAAEtI/yx3JN2WluyE/s72-c/image_thumb%25255B3%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.sqljason.com/2012/11/classifying-and-solving-events-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEAGRXs9eyp7ImA9WhNQFkU.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-6582344036691689216</id><published>2012-11-23T09:50:00.001-05:00</published><updated>2012-11-23T09:58:44.563-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-23T09:58:44.563-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Office 2013" /><category scheme="http://www.blogger.com/atom/ns#" term="PowerPivot" /><title>Changing PivotTable Names in Excel 2013 + Bug Alert</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Today is Black Friday here in the US and I don’t have time to write a regular post (as I am scourging for deals online and planning to get out for shopping as soon as the insane lines outside the stores dwindle in numbers). So this is just going to be a quick tip for those who have tried upgrading their PowerPivot models with linked tables from Excel 2010 to Excel 2013 and found out that their PivotTable names don’t match anymore. &lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-R2tCn4KvuB4/UK-NLOT3PyI/AAAAAAAAEqo/sF_G_nIX0v8/s1600-h/1%252520Changing%252520PivotTable%252520names%252520in%252520Excel%2525202013%25255B3%25255D.jpg"&gt;&lt;font color="#000000" size="2"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="1 Changing PivotTable names in Excel 2013" border="0" alt="1 Changing PivotTable names in Excel 2013" src="http://lh6.ggpht.com/-OWMvRNcn0PI/UK-NL3ITkII/AAAAAAAAEqw/t-iPah-6XNE/1%252520Changing%252520PivotTable%252520names%252520in%252520Excel%2525202013_thumb%25255B1%25255D.jpg?imgmax=800" width="431" height="261"&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;For those who are not familiar, let me give an account of the issue. If you upgrade a PowerPivot model which has linked tables from Excel 2010 to 2013, you will notice that the table names in the field list don’t match the table names in your model. As per my testing, this doesn’t break the measures that you might have created using the old table names (as the measures still use the table names in the data model and this name change looks to be more of a front-end display name) but might be a real inconvenience. Follow the steps below to reproduce and solve the issue:-&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;1) For the purpose of this demo, let us use the PowerPivot file that I created in Excel 2010 for my last post - &lt;a title="Measure Selection using Slicers in PowerPivot" href="http://www.sqljason.com/2012/11/measure-selection-using-slicers-in.html"&gt;Measure Selection using Slicers in PowerPivot&lt;/a&gt;. You can download it from this &lt;a title="Download the Excel 2010 file by clicking here" href="https://docs.google.com/open?id=0B1k6zmQ4NXQlYnB6bVBzMVlWMWM"&gt;&lt;strong&gt;link&lt;/strong&gt;&lt;/a&gt;. If you open it in Excel 2010, you can see the original table names in the field list as well as the linked tables used to create the model above.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-mDEFoYXXEc0/UK-NMvvNwCI/AAAAAAAAEq4/e7GRpkrGguA/s1600-h/2%252520Table%252520names%252520in%252520Excel%2525202010%25255B3%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2 Table names in Excel 2010" border="0" alt="2 Table names in Excel 2010" src="http://lh4.ggpht.com/-0z86SEVzFa0/UK-NNLI8CiI/AAAAAAAAErA/AsR0cHlUGoY/2%252520Table%252520names%252520in%252520Excel%2525202010_thumb%25255B1%25255D.jpg?imgmax=800" width="504" height="267"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;2) Now close the file and then re-open in Excel 2013. Julie Koesmarno (&lt;a href="http://www.mssqlgirl.com/" target="_blank"&gt;blog&lt;/a&gt; | &lt;a href="https://twitter.com/MsSQLGirl" target="_blank"&gt;twitter&lt;/a&gt;) has put a step by step post to upgrade this workbook from 2010 to 2013 &lt;/font&gt;&lt;a title="Click here to read post" href="http://www.mssqlgirl.com/measure-selection-using-slicers-excel-2013.html" target="_blank"&gt;&lt;strong&gt;&lt;font size="2"&gt;here&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt;&lt;font size="2"&gt;. Also have a look at this post – &lt;a title="Upgrade PowerPivot Data Models to 2013" href="http://office.microsoft.com/en-us/excel-help/upgrade-powerpivot-data-models-to-excel-2013-HA103356104.aspx" target="_blank"&gt;Upgrade PowerPivot Data Models to 2013&lt;/a&gt; for any potential issues while upgrading your workbook. Now once you have done that, you will see that all the table names have changed in the field list.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-e6U0fFEHYRg/UK-NOEb_HsI/AAAAAAAAErI/5sBDbeYt_co/s1600-h/3%252520Changed%252520table%252520names%252520in%252520Excel%2525202013%25255B3%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="3 Changed table names in Excel 2013" border="0" alt="3 Changed table names in Excel 2013" src="http://lh4.ggpht.com/-vFOKaaWU-5w/UK-NOgM-bgI/AAAAAAAAErQ/ft9Joyr-1eQ/3%252520Changed%252520table%252520names%252520in%252520Excel%2525202013_thumb%25255B1%25255D.jpg?imgmax=800" width="504" height="266"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;However, there is no change to the table names in the underlying PowerPivot data model.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-vnN0kkZvxbw/UK-NPTNRzRI/AAAAAAAAErY/7BNGgadNbQ4/s1600-h/4%252520Name%252520in%252520PowerPivot%252520model%25255B3%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="4 Name in PowerPivot model" border="0" alt="4 Name in PowerPivot model" src="http://lh4.ggpht.com/-WFCzNxsQRxQ/UK-NQML02qI/AAAAAAAAErg/yoq4mFEe9fo/4%252520Name%252520in%252520PowerPivot%252520model_thumb%25255B1%25255D.jpg?imgmax=800" width="404" height="328"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;font size="2"&gt;3) To change the name in the PivotTable field list, all you have to do is to select a cell in the respective linked table, click on Design and then enter the original / required name in the Table Name cell as shown below&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-8ZHJRcmWQ-8/UK-NRCwevEI/AAAAAAAAEro/MQ3nJEnaK28/s1600-h/5%252520Rename%252520table%25255B2%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="5 Rename table" border="0" alt="5 Rename table" src="http://lh6.ggpht.com/-FsfXWqvXD-s/UK-NRWtFisI/AAAAAAAAErs/ZPzP0-_vRBw/5%252520Rename%252520table_thumb.jpg?imgmax=800" width="504" height="236"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;4) You can see that the changes are reflected in the PivotTable field list now.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-Iv50O6P-rE8/UK-NSdLTIiI/AAAAAAAAEr4/EXWYqSkles4/s1600-h/6%252520Name%252520change%252520in%252520Excel%2525202013%25255B2%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="6 Name change in Excel 2013" border="0" alt="6 Name change in Excel 2013" src="http://lh4.ggpht.com/-qxMiEfvlTuM/UK-NSldGKjI/AAAAAAAAEsA/cMrrcXCm4nE/6%252520Name%252520change%252520in%252520Excel%2525202013_thumb.jpg?imgmax=800" width="190" height="265"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;You could avoid doing these steps in Excel 2013 if you had renamed your linked tables in Excel 2010 using the same way before upgrading. If not, it will just take the name of the linked table when you upgrade.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Apparently, this is a known issue and will be fixed in the next release as per this &lt;a title="MSDN Forum" href="http://social.msdn.microsoft.com/Forums/en/officedevpreview/thread/8180b8bc-8d9a-4c37-a0ce-3eb54f237eed" target="_blank"&gt;&lt;strong&gt;thread&lt;/strong&gt;&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#ff0000" size="2"&gt;&lt;strong&gt;&lt;u&gt;BUG ALERT!!!&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;If you paid close attention to the file that you just upgraded, you can notice that the slicer for measure name is not working. Now this seems to work for people who have installed the Office Professional Plus (v 15.0.4420.1017) but for people like me who have installed the Excel Preview (v 15.0.4128.1025), the slicers don’t work. Turns out the reason was that FORMAT function doesn’t play well within a measure expression. All you have to do is to change the measure expression for MsrValue from &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;strong&gt;MsrValue&lt;/strong&gt;:=switch (TRUE,&lt;br&gt;Min ( Msr[MsrId] ) = 1,&lt;br&gt;FORMAT ( Sum ( Fct[Sales] ), "$#,#0" ),&lt;br&gt;Min ( Msr[MsrId] ) = 2,&lt;br&gt;format ( Sum ( Fct[Quantity] ), "#,#0" ),&lt;br&gt;Min ( Msr[MsrId] ) = 3,&lt;br&gt;format ( Sum ( Fct[Profit] ), "$#,#0" )&lt;br&gt;)&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;to &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;strong&gt;MsrValue&lt;/strong&gt;:=switch (TRUE,&lt;br&gt;Min ( Msr[MsrId] ) = 1,&lt;br&gt;Sum ( Fct[Sales] ),&lt;br&gt;Min ( Msr[MsrId] ) = 2,&lt;br&gt;Sum ( Fct[Quantity] ),&lt;br&gt;Min ( Msr[MsrId] ) = 3,&lt;br&gt;Sum ( Fct[Profit] )&lt;br&gt;)&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;Of course this does mean that you lose the formatting. Now you can see that the slicers are working. This clearly is a bug as it works in Excel 2010 (as well as in the Professional Plus edition of Excel 2013). I have raised a &lt;a title="Click and vote up this bug!" href="https://connect.microsoft.com/SQLServer/feedback/details/772055/powerpivot-measures-not-able-to-handle-format-function-in-excel-2013" target="_blank"&gt;&lt;strong&gt;Connect issue here&lt;/strong&gt;&lt;/a&gt;, please vote for it so that it can be rectified in the next release. Ok, time to run for the Black Friday shopping now!&lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=CrEqvJd0MQs:3kwROxun3Bw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=CrEqvJd0MQs:3kwROxun3Bw:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=CrEqvJd0MQs:3kwROxun3Bw:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/CrEqvJd0MQs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/6582344036691689216/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2012/11/changing-pivottable-names-in-excel-2013.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/6582344036691689216?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/6582344036691689216?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/CrEqvJd0MQs/changing-pivottable-names-in-excel-2013.html" title="Changing PivotTable Names in Excel 2013 + Bug Alert" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-OWMvRNcn0PI/UK-NL3ITkII/AAAAAAAAEqw/t-iPah-6XNE/s72-c/1%252520Changing%252520PivotTable%252520names%252520in%252520Excel%2525202013_thumb%25255B1%25255D.jpg?imgmax=800" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://www.sqljason.com/2012/11/changing-pivottable-names-in-excel-2013.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUNQX07fCp7ImA9WhNQFU8.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-7376231397386610413</id><published>2012-11-21T13:41:00.001-05:00</published><updated>2012-11-21T13:41:30.304-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-21T13:41:30.304-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PowerPivot" /><category scheme="http://www.blogger.com/atom/ns#" term="DAX" /><title>Measure Selection using Slicers in PowerPivot</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;As a Business Intelligence professional, I find it really fascin(/frustr)ating working with Excel users. You get exposed to a completely different way of thinking when you work with them, not to say that they are extremely smart and demanding. From the moment I started working with PowerPivot and interacting with Excel users, I knew it was not going to be easy tackling their questions and requirements. You simply cant escape by saying that the required feature is not available because they will push you till you find a workaround. This was the case when one of my users came back to me asking for a slicer which will dynamically help them to select the measures. I replied saying that the slicers are not intended for that purpose and should be used for filtering the data (and not for just selecting or deselecting values like Measures, which can be easily done from the Field List pane). However, the user pushed back saying that he would like to create a dashboard for the top management and didn’t want them to be using the Field List pane. That is when I had to put on my thinking cap.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-sqtjqRrPd4Y/UK0gJL5KprI/AAAAAAAAEn0/Sz__HSN08PI/s1600-h/1%252520Measure%252520selection%252520using%252520slicers%252520in%252520powerpivot%25255B4%25255D.jpg"&gt;&lt;font color="#000000"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="1 Measure selection using slicers in powerpivot" border="0" alt="1 Measure selection using slicers in powerpivot" src="http://lh4.ggpht.com/-wRqZnIuZnd0/UK0gKGf-PhI/AAAAAAAAEn8/lndLqEPANvw/1%252520Measure%252520selection%252520using%252520slicers%252520in%252520powerpivot_thumb%25255B2%25255D.jpg?imgmax=800" width="400" height="137"&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;For the purpose of this post, I am going to use some simple mocked up data which involves three measures (Sales, Quantity and Profit) for country and year. &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-4IzuMG0vQKo/UK0gK6xYD3I/AAAAAAAAEoE/kXtXqOz_0TU/s1600-h/2%252520Data%252520model%252520and%252520sample%252520data%25255B4%25255D.jpg"&gt;&lt;font color="#000000"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="2 Data model and sample data" border="0" alt="2 Data model and sample data" src="http://lh5.ggpht.com/-IJNNVMIEsyA/UK0gLlN5tmI/AAAAAAAAEoM/EqE2tLWnMlw/2%252520Data%252520model%252520and%252520sample%252520data_thumb%25255B2%25255D.jpg?imgmax=800" width="400" height="323"&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Follow the steps below to recreate a slicer which can be used to select or deselect the measures in a pivot table:-&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;1) Create a table which will have the list of measure names needed in the slicer in the MeasureName column and their representative integer ids in the MsrId column. Import this table into PowerPivot using Linked Tables and name it as Msr.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-UaesMqvPoBU/UK0gMR5xocI/AAAAAAAAEoU/jxTYWAc9UyM/s1600-h/3%252520Create%252520Linked%252520table%252520in%252520powerpivot%25255B4%25255D.jpg"&gt;&lt;font color="#000000"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="3 Create Linked table in powerpivot" border="0" alt="3 Create Linked table in powerpivot" src="http://lh5.ggpht.com/-N_wFVMx3pOk/UK0gM2cksBI/AAAAAAAAEoY/UOV37A6DdHo/3%252520Create%252520Linked%252520table%252520in%252520powerpivot_thumb%25255B2%25255D.jpg?imgmax=800" width="254" height="263"&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;There is no need to make any relations with the existing tables, and Msr table should be a standalone table.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;2) Now make a new measure called MsrValue with the formula given below&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;strong&gt;MsrValue&lt;/strong&gt;:=switch (TRUE,&lt;br&gt;Min ( Msr[MsrId] ) = 1,&lt;br&gt;Sum ( Fct[Sales] ),&lt;br&gt;Min ( Msr[MsrId] ) = 2,&lt;br&gt;Sum ( Fct[Quantity] ),&lt;br&gt;Min ( Msr[MsrId] ) = 3,&lt;br&gt;Sum ( Fct[Profit] )&lt;br&gt;)&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-8gpET_Pg4HM/UK0gNeEd2gI/AAAAAAAAEog/O3BCS0Eu7HA/s1600-h/4%252520New%252520measure%25255B3%25255D.jpg"&gt;&lt;font color="#000000"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="4 New measure" border="0" alt="4 New measure" src="http://lh5.ggpht.com/-Y-PucPr3-pA/UK0gOFpTRQI/AAAAAAAAEos/YCCETZACbaM/4%252520New%252520measure_thumb%25255B1%25255D.jpg?imgmax=800" width="404" height="251"&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;This measure will check the value of the MsrId column, and then use the appropriate measure. However, it should be noted that when there are more than one value of MsrId (or if more than one measures are selected), only the measure having minimum value of MsrId would be displayed. So how will we display more than one measures on the pivot table? Read on.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;3) With this very simple setup, we are ready to view the results in the Pivot table. Drag and drop MeasureName column into the Slicer, Year into the Column Labels and Country in the Row Labels. Then drag and drop MsrValue in the Values and we should have something similar to the image below. I have also included the fact rows above the pivot so that we can compare.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-sAvHZ4Scdt8/UK0gOrawGVI/AAAAAAAAEo0/VPUtSCSHazI/s1600-h/5%252520Drag%252520column%252520to%252520pivot%252520table%252520and%252520insert%252520slicer%25255B4%25255D.jpg"&gt;&lt;font color="#000000"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="5 Drag column to pivot table and insert slicer" border="0" alt="5 Drag column to pivot table and insert slicer" src="http://lh3.ggpht.com/-_Bnj7T2ocvA/UK0gPVPsmbI/AAAAAAAAEo8/q-1CSMjR1l0/5%252520Drag%252520column%252520to%252520pivot%252520table%252520and%252520insert%252520slicer_thumb%25255B2%25255D.jpg?imgmax=800" width="504" height="264"&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Now there are a couple of problems with this pivot table. You would have noticed that the pivot table works correctly if only one measure is selected, but if there are more than one selections for the measure name, it will only show the measure with the minimum of the MsrId (eg, Sales in the image above). Also, we would like to see the name of the measure in the column above for clarity. To solve both of these problems, follow the next step.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;4) Just drag and drop the MeasureName column in the Column Labels above the Year. &lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/--Ln5DplYtf8/UK0gSb8kp9I/AAAAAAAAEpE/Qb0TiE-Q5Js/s1600-h/7%252520Field%252520list%252520pane%25255B2%25255D.jpg"&gt;&lt;font color="#000000"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="7 Field list pane" border="0" alt="7 Field list pane" src="http://lh4.ggpht.com/-7YAqaHv-ThA/UK0gTPqi0WI/AAAAAAAAEpM/Hx4xCQ78bks/7%252520Field%252520list%252520pane_thumb.jpg?imgmax=800" width="244" height="234"&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Now you can see that multiple measures are displayed and also that the measure names are displayed in the column above.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-uHdXKH8yxrg/UK0gT80QXII/AAAAAAAAEpU/NCX22VBMiGE/s1600-h/6%252520Measure%252520getting%252520selected%252520in%252520pivot%252520table%252520as%252520per%252520the%252520slicer%252520selection%25255B3%25255D.jpg"&gt;&lt;font color="#000000"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="6 Measure getting selected in pivot table as per the slicer selection" border="0" alt="6 Measure getting selected in pivot table as per the slicer selection" src="http://lh3.ggpht.com/-B3z1Yl5N8Hg/UK0gUrhHMxI/AAAAAAAAEpc/y1dJlzFs48M/6%252520Measure%252520getting%252520selected%252520in%252520pivot%252520table%252520as%252520per%252520the%252520slicer%252520selection_thumb%25255B1%25255D.jpg?imgmax=800" width="504" height="208"&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;You can also change the formatting of the measures if needed&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;strong&gt;MsrValue&lt;/strong&gt;:=switch (TRUE,&lt;br&gt;Min ( Msr[MsrId] ) = 1,&lt;br&gt;FORMAT ( Sum ( Fct[Sales] ), "$#,#0" ),&lt;br&gt;Min ( Msr[MsrId] ) = 2,&lt;br&gt;format ( Sum ( Fct[Quantity] ), "#,#0" ),&lt;br&gt;Min ( Msr[MsrId] ) = 3,&lt;br&gt;format ( Sum ( Fct[Profit] ), "$#,#0" )&lt;br&gt;)&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-gMD1c2HsV1M/UK0gVfWlrgI/AAAAAAAAEpk/OO9OMrAgABM/s1600-h/8%252520formatted%252520measures%25255B4%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="8 formatted measures" border="0" alt="8 formatted measures" src="http://lh6.ggpht.com/-bguiSf2f1Ko/UK0gV4h5gZI/AAAAAAAAEps/WAnYWyWPPdw/8%252520formatted%252520measures_thumb%25255B2%25255D.jpg?imgmax=800" width="504" height="114"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;Luckily, that wasn’t as hard as I thought (which means that I could still use my evening free time to focus on more important problems like whether the chicken or egg came first into the world!). If you don’t have such important problems to focus on like me, you can download the completed file from this &lt;a title="Download the file by clicking here" href="https://docs.google.com/open?id=0B1k6zmQ4NXQlYnB6bVBzMVlWMWM" target="_blank"&gt;&lt;strong&gt;&lt;u&gt;link&lt;/u&gt;&lt;/strong&gt;&lt;/a&gt; and test it out on your own!&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=kAjHQtuSGVA:yjRM2XDSQoY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=kAjHQtuSGVA:yjRM2XDSQoY:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=kAjHQtuSGVA:yjRM2XDSQoY:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/kAjHQtuSGVA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/7376231397386610413/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2012/11/measure-selection-using-slicers-in.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/7376231397386610413?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/7376231397386610413?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/kAjHQtuSGVA/measure-selection-using-slicers-in.html" title="Measure Selection using Slicers in PowerPivot" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-wRqZnIuZnd0/UK0gKGf-PhI/AAAAAAAAEn8/lndLqEPANvw/s72-c/1%252520Measure%252520selection%252520using%252520slicers%252520in%252520powerpivot_thumb%25255B2%25255D.jpg?imgmax=800" height="72" width="72" /><thr:total>4</thr:total><feedburner:origLink>http://www.sqljason.com/2012/11/measure-selection-using-slicers-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck8MQ3g_eSp7ImA9WhNQEkU.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-1676908702291085564</id><published>2012-11-18T18:14:00.001-05:00</published><updated>2012-11-18T18:21:22.641-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-18T18:21:22.641-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Activities / Whitepapers / Events" /><title>PASS Summit 2012 Hangover</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;November has always been my favourite month of the year though I don’t really have a clear cut reason for that. Maybe it is because that my birthday falls in this month and I look forward to opening all those lovely gifts that I usually get. Or maybe because it is the time of the year when you get to see nature in her splendid fall colours and her transition to winter. Or could it be the simple reason that you get 50% off Halloween candy? (in case you didn’t know, I have a BIG sweet tooth) Anyways, I always look forward to November eagerly. Moreover, this year’s November was extra special -&amp;nbsp; I was going to attend my first PASS Summit.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-CFumWVt2Xbs/UKlrwZ9a7yI/AAAAAAAAElY/UHr3LdJz5tg/s1600-h/Summit2012_header_passlogo3.jpg"&gt;&lt;font color="#000000"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="Summit2012_header_passlogo" border="0" alt="Summit2012_header_passlogo" src="http://lh6.ggpht.com/-V5MTr6FoByE/UKlrwicSYSI/AAAAAAAAElg/seKoLdxIZ4Q/Summit2012_header_passlogo_thumb1.jpg?imgmax=800" width="286" height="83"&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;I started my baby steps in Microsoft BI six years back although I was blissfully ignorant of whatever community activities was happening then. I have always been an inquisitive mind (or a heckler, depends on whom you ask) and used to ask a lot of questions. Usually, my technical doubts were answered by the senior consultants in my company, and it was by chance that I got redirected to the &lt;a title="MSDN forums" href="http://social.msdn.microsoft.com/Forums/en-US/user/forums"&gt;MSDN forums&lt;/a&gt; (the truth is, they were tired of my constant questions). I think that was when I started getting cognizant of the SQL world and the community. I asked more questions, started recognizing the big names in the BI world, read more blogs by them and before I knew it, I was hooked onto this technology. &lt;a title="My profile in MSDN forums" href="http://social.msdn.microsoft.com/Profile/jason%20tom%20thomas/activity"&gt;I started answering questions in the forums&lt;/a&gt; apart from just asking them and I really enjoyed the kick that you get out of helping people. It also fuelled my personal growth and soon, I decided to share my learning by starting a &lt;a title="My Blog - www.SqlJason.com" href="http://www.sqlJason.com"&gt;blog&lt;/a&gt;. Fortunately for me, that was the time I moved to London, UK and I got a first real taste of &lt;a title="UK SQL Server User Groups" href="http://www.sqlserverfaq.com/"&gt;user groups&lt;/a&gt;. I started attending the bi-annual &lt;a href="http://sqlbits.com/"&gt;SQLBits&lt;/a&gt; conference and it sort of inspired me to start speaking. However, I had never given a talk before (not even in my company) and my bouts of stage fright were legendary in my friend circles. But when you wish for something really hard, the entire universe conspires to make it happen. I decided to mail Chris Webb (&lt;a href="http://cwebbbi.wordpress.com/"&gt;Blog&lt;/a&gt; | &lt;a href="https://twitter.com/Technitrain"&gt;Twitter&lt;/a&gt;) asking him if I could speak on one of the user groups and he set me up for my first talk (I don’t think I would have ever had the guts to ask again if I was rejected then). He also encouraged me to submit my abstract for SQLBits (which eventually got picked) and I slowly started getting a little more confident about public speaking. This was one of the many pushes forward that I got from my &lt;a href="https://twitter.com/search/realtime?q=%23sqlfamily&amp;amp;src=hash"&gt;#sqlfamily&lt;/a&gt; (oh yes, that is what they are to me now, not just a community). When I moved to the US, I started submitting to the &lt;a href="http://sqlsaturday.com/"&gt;SQL Saturdays&lt;/a&gt; with the encouragement of many people in the community, and I am proud to say that the &lt;a title="SQL Saturday 173 (Washington DC)" href="http://sqlsaturday.com/173/eventhome.aspx"&gt;Washington DC&lt;/a&gt; one is going to be my 10th SQL Saturday this year (and this is apart from the user group, code camp and virtual chapter talks that I gave). For a person who would have his knees shake if he was standing and speaking in front of 4 people, this definitely was a big achievement and I have my #sqlfamily to thank for. For me, this cooperation and mutual encouragement was best epitomised in &lt;a href="http://www.sqlsaturday.com/158/eventhome.aspx"&gt;SQL Saturday New York City&lt;/a&gt;. I was the next speaker after Kevin Kline (&lt;a href="http://kevinekline.com/"&gt;Blog&lt;/a&gt; | &lt;a href="https://twitter.com/kekline"&gt;Twitter&lt;/a&gt;) and just when I was setting up my laptop, I realized that I didn’t have my HDMI-to-VGA connector for projecting (and I could have sworn that I had checked it before leaving the speaker room, must have dropped it somewhere). I was totally freaked out - none in the speaker room had a converter and I had the demos only on my laptop. I was almost on the verge of cancelling my session. As a last try, I asked Kevin, who was on his way out, whether he could lend me his laptop so that I could try to use his laptop (which had a VGA port) for setting up a live meeting between mine and his laptops, and then projecting the demos from his laptop. Not only did he agree, but he came to my room to calm down my nerves, helped me in setting up the laptops and was throughout my side for the entire session. The session went great and I had lots of my attendees saying that it was really good. If it wasn’t for Kevin, I would have had an embarrassing situation and he saved my day (and to put things to perspective, he barely knew me!!!). I couldn’t even say thanks properly to him because he was already late for some other appointment and had too rush off. That is how selfless people in the #sqlfamily are and I really wanted to be a part of the biggest family reunion of the #sqlfamily – the PASS Summit.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;I reached Seattle on Tuesday afternoon and straightaway went to the Chapter Leaders meeting where we discussed on how we can make our user groups more effective. It was very useful to hear from other chapter leaders on how they are organizing their user groups in terms of finance, attendees, marketing, speakers, etc. I also made sure to attend the &lt;a href="https://twitter.com/search/realtime?q=%23sqlfirsttimers&amp;amp;src=hash"&gt;#sqlFirstTimers&lt;/a&gt; meeting where all of the first time attendees were given advice on how to network and make the most of the PASS Summit.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;a href="http://lh3.ggpht.com/-M-BveDRX_kc/UKlrxTmgSWI/AAAAAAAAElo/Hz154zBNdnA/s1600-h/PASS%252520Photos1%25255B3%25255D.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="PASS Photos1" border="0" alt="PASS Photos1" src="http://lh4.ggpht.com/-wvq5zcaUyXs/UKlrxrJ83PI/AAAAAAAAElw/AVqsP2xuYLg/PASS%252520Photos1_thumb%25255B1%25255D.jpg?imgmax=800" width="604" height="342"&gt;&lt;/a&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Over the next three days, all the attendees were presented with a rich selection of sessions across all tracks and difficulty levels. I chose the Intermediate to Advanced topics for Business Intelligence and was truly happy with the results. It was great to attend sessions by Chris Webb, Marco Russo, Alberto Ferrari, Stacia Misner, Allan Folting &amp;amp; Akshai Mirchandani, Paul Turley, Melissa Coates, etc and I learned a lot from these great speakers. It was very difficult making a choice between all the great sessions and I hope to catch up with the rest of the sessions through the recordings.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-MXDUl5yaPzA/UKlry9ZN-KI/AAAAAAAAEl4/rXjucv2tK_s/s1600-h/PASS%252520Photos2%25255B11%25255D.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="PASS Photos2" border="0" alt="PASS Photos2" src="http://lh3.ggpht.com/-hOVBV2cKG3w/UKlrzRnYCsI/AAAAAAAAEmA/daUxciT7EFA/PASS%252520Photos2_thumb%25255B4%25255D.jpg?imgmax=800" width="604" height="342"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;As I mentioned before, the PASS Summit was also a place to meet my #sqlfamily. There were a lot of people I had met over twitter and it was a fabulous opportunity to associate faces to those twitter handles. I was also able to reconnect with my friends from UK and India and it was so much like meeting your family again after a long interval.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-cs76CKlxADw/UKlr0DdSQoI/AAAAAAAAEmI/h3OA9MpkFpI/s1600-h/PASS%252520Photos3%25255B3%25255D.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="PASS Photos3" border="0" alt="PASS Photos3" src="http://lh5.ggpht.com/--Qfb5J6g3O0/UKlr0u_penI/AAAAAAAAEmQ/zJlJa_4hkYg/PASS%252520Photos3_thumb%25255B1%25255D.jpg?imgmax=800" width="604" height="342"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;The various parties after the sessions kept me busy in the night too. It was awesome getting my first dose of &lt;a href="https://twitter.com/search?q=%23sqlkaraoke"&gt;#sqlkaraoke&lt;/a&gt; and I was up all the 4 nights – thanks to the Quizball event by SQL Sentry, Hard Rock Cafe event by Pragmatic Works, the Experience Music Project event by Microsoft and of course, the traditional &lt;a href="https://twitter.com/search?q=%23sqlkaraoke"&gt;#sqlkaraoke&lt;/a&gt; event at Bush Gardens.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-TBhOzBi3wac/UKlr1cwK-JI/AAAAAAAAEmY/TRApsIz09WU/s1600-h/PASS%252520Party%252520Photos%25255B7%25255D.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="PASS Party Photos" border="0" alt="PASS Party Photos" src="http://lh4.ggpht.com/-BfiC-vUz6cs/UKlr10fPEyI/AAAAAAAAEmg/gRz6Ro_BZUM/PASS%252520Party%252520Photos_thumb%25255B2%25255D.jpg?imgmax=800" width="604" height="342"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;I also made sure to stay a couple of days after the event to explore the city as it was my first time in Seattle. I must say the weather gods took mercy on us and we had some nice sunshine, so unlike Seattle &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://lh5.ggpht.com/-x6cDBYgzNho/UKlr2WKmRkI/AAAAAAAAEmo/7AwvTwWaIlw/wlEmoticon-smile%25255B2%25255D.png?imgmax=800"&gt;. &lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-gIolRnRAGBM/UKlr2ytY6kI/AAAAAAAAEmw/WIc0efm8hJ4/s1600-h/PASS%252520Photos4%25255B3%25255D.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="PASS Photos4" border="0" alt="PASS Photos4" src="http://lh5.ggpht.com/-o3sBvssr0VE/UKlr3jVBQcI/AAAAAAAAEm4/ayI68AxTrjc/PASS%252520Photos4_thumb%25255B1%25255D.jpg?imgmax=800" width="604" height="342"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;All in all, it was a great trip and it was hard to bid goodbye to the city when it all ended. People usually say that when you go somewhere with a lot of expectations, you usually end up with disappointment. However, the PASS Summit 2012 was above my expectations and I really savoured every moment of it. Guess it is time to end my long post. Hope to see all of you guys for the next PASS Summit, which will be held in the beautiful city of Charlotte. It will be much easier for me as I am based out of Charlotte and I will be there to welcome all of you guys to our annual family reunion! &lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=2d39KFIk0BU:3K258YD6Vwo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=2d39KFIk0BU:3K258YD6Vwo:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=2d39KFIk0BU:3K258YD6Vwo:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/2d39KFIk0BU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/1676908702291085564/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2012/11/pass-summit-2012-hangover.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/1676908702291085564?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/1676908702291085564?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/2d39KFIk0BU/pass-summit-2012-hangover.html" title="PASS Summit 2012 Hangover" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-V5MTr6FoByE/UKlrwicSYSI/AAAAAAAAElg/seKoLdxIZ4Q/s72-c/Summit2012_header_passlogo_thumb1.jpg?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.sqljason.com/2012/11/pass-summit-2012-hangover.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A08NSXkyfip7ImA9WhNREUs.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-4220511057410950024</id><published>2012-11-05T21:44:00.001-05:00</published><updated>2012-11-05T21:44:58.796-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-05T21:44:58.796-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Activities / Whitepapers / Events" /><title>SQL Saturday Charlotte Journal</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Was it fun? Oh yeah, it was. Was it perfect? Hmm, maybe not. But was it awesome? Definitely yes! Let me tell you, it was an amazing experience being a part of the whole process. SQL Saturday Charlotte was my 9th SQL Saturday of this year, but there was a big difference from the other ones – this time, I was wearing the Organizer hat and not the Speaker hat.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-xvrprw86S4c/UJh5jO97NPI/AAAAAAAAEhs/qVJ46AcATNQ/s1600-h/logo14.png"&gt;&lt;font color="#000000"&gt;&lt;a href="http://lh4.ggpht.com/-xvrprw86S4c/UJh5jO97NPI/AAAAAAAAEh0/rYg6GjNV9tI/s1600-h/logo15.png"&gt;&lt;font size="2"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="logo1" border="0" alt="logo1" src="http://lh6.ggpht.com/-RewZMdPFcPM/UJh5kaM48ZI/AAAAAAAAEh4/wTn15lfOnSo/logo1_thumb3.png?imgmax=800" width="300" height="146"&gt;&lt;/font&gt;&lt;/a&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;It all started around March of this year when me and Javier Guillen (&lt;a href="http://javierguillen.wordpress.com/" target="_blank"&gt;blog&lt;/a&gt; | &lt;a href="https://twitter.com/javiguillen" target="_blank"&gt;twitter&lt;/a&gt;) were seriously contemplating on starting a BI user group in Charlotte. We pulled in our common friend, Melissa Coates (&lt;a href="www.sqlchick.com" target="_blank"&gt;blog&lt;/a&gt; | &lt;a href="https://twitter.com/SQLChick" target="_blank"&gt;twitter&lt;/a&gt;) to this plan and she in turn informed us that Rafael Salas (&lt;a href="http://www.rafael-salas.com/" target="_blank"&gt;blog&lt;/a&gt; | &lt;a href="https://twitter.com/RafSalas" target="_blank"&gt;twitter&lt;/a&gt;) was also trying to do the same. We joined forces and this marked the start of the evening #BeerAndBI rituals, where we started to come up with ideas and plans to start our new user group. &lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-VtS__6e3m-4/UJh5lLEZ1LI/AAAAAAAAEiA/Ud15r5qGO_8/s1600-h/Beer-and-BI3.jpg"&gt;&lt;font size="2"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Beer and BI" border="0" alt="Beer and BI" src="http://lh3.ggpht.com/-b6MUmsr6WDM/UJh5llpMHmI/AAAAAAAAEiI/xf3LKqqjRf4/Beer-and-BI_thumb1.jpg?imgmax=800" width="504" height="379"&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;In one of those sober (?) rituals, the SQL Saturday idea was introduced and then there was no turning back from there. We informed Karla Landrum (&lt;a href="https://twitter.com/KarlaKay22" target="_blank"&gt;twitter&lt;/a&gt;) of our intentions and she was extremely supportive. We started with checking venues around June, and I must say we were really lucky to have Alberto Botero of Central Piedmont Community College as our friend. He acted as a bridge between the college and us, and ensured we had a venue to start off with. We confirmed the dates for SQL Saturday with Karla by June end and started our preparations. Having a big team has its own advantages, it was easier to split tasks without over-burdening anyone. Rafael was in charge of the sponsors and food section, Javier was in charge of finance and venue related section, Melissa was in charge of social media, website, emails, general coordination, etc and me in charge of recruiting speakers and making the schedule. Even though we were assigned specific tasks, it was great to see everyone pooling in their efforts wherever they could. We also got Shannon Lowder (&lt;a href="http://shannonlowder.com" target="_blank"&gt;blog&lt;/a&gt; | &lt;a href="https://twitter.com/shannonlowder" target="_blank"&gt;twitter&lt;/a&gt;) to help us coordinate all the volunteers. And when the day finally came for setting up the venue on the day before, there were lot of unforgettable moments, for example stuffing the bags on the eve of the event with Javier, Rafael setting off the fire alarm when we were already running late for the speaker dinner, setting up the tables and the cute little raffle boxes made by Melissa, last minute printing with the help of Shannon’s iPhone, etc. The speaker dinner was well attended and was fabulous, we even managed to have a few shots before we left.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-UmScMgXmtqM/UJh5mY-s2GI/AAAAAAAAEiQ/dI64UsVqd9M/s1600-h/ed1ebb61-487a-423a-a60c-33cdb5c15739wallpaper%25255B5%25255D.jpg"&gt;&lt;font size="2"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Event pics" border="0" alt="Event pics" src="http://lh3.ggpht.com/-Glai5y9Rx-k/UJh5m8nDMLI/AAAAAAAAEiY/0xOv2TTmrN0/ed1ebb61-487a-423a-a60c-33cdb5c15739wallpaper_thumb%25255B3%25255D.jpg?imgmax=800" width="500" height="423"&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;On the D-day, we reached the venue around 6:45 am in the morning and from that time on till the afternoon, we were so busy that we couldn’t even speak much with each other. I was always of the mentality that we had planned more than necessary and things will flow pretty easily during the event. I couldn’t have been more wrong and it really took a lot of effort from our as well as our volunteers’ side to make sure everything went well. This made me appreciate the great work done by all our volunteers and organizers of past SQL Saturdays all the more. At the end of the day, it felt great to hear all the positive responses about the event from our attendees. A big thanks to all our sponsors, speakers and volunteers who made this possible. &lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;&lt;a href="http://lh3.ggpht.com/-T4A4btP18Ag/UJh5p2VPUnI/AAAAAAAAEig/wqBfu5lbjfs/s1600-h/sqlsat%25255B6%25255D.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Some of the volunteers of #sqlsat174" border="0" alt="Some of the volunteers of #sqlsat174" src="http://lh6.ggpht.com/-sOHQO7dSk0Y/UJh5qTpUX9I/AAAAAAAAEik/h-hNRHJDmeY/sqlsat_thumb%25255B2%25255D.jpg?imgmax=800" width="404" height="302"&gt;&lt;/a&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;It was fun and although it took me around a week to recover completely, I sort of miss all the madness involved in planning a SQL Saturday right now. Anyways, I am sure there will be much more to it with the start of the &lt;a href="http://charbigroup.com/" target="_blank"&gt;new BI group in Charlotte&lt;/a&gt;.&lt;/font&gt;  &lt;p align="justify"&gt;&lt;a href="http://charbigroup.com/"&gt;&lt;font size="2"&gt;&lt;a href="http://charbigroup.com/" target="_blank"&gt;&lt;img title="CBIG" border="0" alt="CBIG" src="http://www.sqlchick.com/resource/Windows-Live-Writer-28c690959d37_A33C-?fileId=20848257" width="342" height="229"&gt;&lt;/a&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;Time to pack up my bags for the PASS Summit and reward myself with a relaxing week at Seattle!&lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=aTS9jGpinLI:TPAOoL0LNP8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=aTS9jGpinLI:TPAOoL0LNP8:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=aTS9jGpinLI:TPAOoL0LNP8:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/aTS9jGpinLI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/4220511057410950024/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2012/11/sql-saturday-charlotte-journal.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/4220511057410950024?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/4220511057410950024?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/aTS9jGpinLI/sql-saturday-charlotte-journal.html" title="SQL Saturday Charlotte Journal" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-RewZMdPFcPM/UJh5kaM48ZI/AAAAAAAAEh4/wTn15lfOnSo/s72-c/logo1_thumb3.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.sqljason.com/2012/11/sql-saturday-charlotte-journal.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYBRXk8fip7ImA9WhNSFUs.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-8403854563207246100</id><published>2012-10-29T21:55:00.001-04:00</published><updated>2012-10-29T21:55:54.776-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-10-29T21:55:54.776-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SSRS" /><title>SSRS Charts with Data Tables (Excel Style)</title><content type="html">&lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;Ok, this post was supposed to come out a lot earlier but I was just too lazy. Complacency is a struggle we all have to fight and I would be lying if I say that I am immune to all these. This post is a direct result of a few forum posts where people said that charts with data tables are not possible in SSRS (unless you add a tablix beneath the chart and spend umpteen hours trying to align both of them!). Working with SSRS is like making love to a woman - you need to know the woman and what makes her click well for a fabulous time. Well, you can still manage without knowing her well enough, just that it wont be that awesome! &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://lh4.ggpht.com/-DwNDQFUjBCw/UI8zJu4O1xI/AAAAAAAAEbY/uNSNLAH08ok/wlEmoticon-winkingsmile2.png?imgmax=800"&gt;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-Al9qTVn_JIg/UI8zLk7yUdI/AAAAAAAAEbg/_X8dK3OHasM/s1600-h/1-Charts-with-Excel-style-data-table.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="1 Charts with Excel style data tables" border="0" alt="1 Charts with Excel style data tables" src="http://lh4.ggpht.com/-Z9yRipyF_t8/UI8zM9KNnHI/AAAAAAAAEbo/A2taEZpeTSI/1-Charts-with-Excel-style-data-table%25255B2%25255D.jpg?imgmax=800" width="404" height="141"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;For people who are familiar with excel charts, adding a data table to a chart is a one-click affair. It is nice to see the data table just beneath the chart and it also serves as a legend. A simple example is shown below:-&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-tthZFTSPPn0/UI8zOcwKLGI/AAAAAAAAEbw/LIohDVw-NAo/s1600-h/2-Excel-chart-with-data-table.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="2 Excel chart with data table" border="0" alt="2 Excel chart with data table" src="http://lh4.ggpht.com/-kBOx6XUnSnU/UI8zPqGS1HI/AAAAAAAAEb4/_DbfeZKXOJE/2-Excel-chart-with-data-table_thumb.jpg?imgmax=800" width="304" height="196"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;In SSRS, having a tablix beneath the chart serves as an ok workaround as long as the number of fields in the category is fixed. When the number of fields change change (lets say, when the value of a report parameter changes), the alignment goes for a toss. Here, I will be demonstrating a much more elegant way to add the data tables than trying to align the tablix and chart.&lt;/font&gt; &lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;1) Create a simple dataset from the AdventureWorks cube, displaying the Month, Category and Internet Sales Amount. Add a parameter for Calendar year with a default value of CY 2007.&lt;/font&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-i9aklcvqwtg/UI8zQzCUZiI/AAAAAAAAEcA/UB9-ffX_PfU/s1600-h/3-Dataset-query3.jpg"&gt;&lt;font size="2"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="3 Dataset query" border="0" alt="3 Dataset query" src="http://lh4.ggpht.com/-nrLI7pf2dMo/UI8zSTirQQI/AAAAAAAAEcI/0wDLERLF6TM/3-Dataset-query_thumb1.jpg?imgmax=800" width="504" height="242"&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;2) Drag and drop a matrix to the designer pane and then add the Category field on the row, Month on the column and Internet_Sales_Amount on the data as shown below&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-Kdmcga7wxgk/UI8zTa4WxjI/AAAAAAAAEcQ/-GkBm2zVDLg/s1600-h/4-SSRS-Matrix-with-fields4.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="4 SSRS Matrix with fields" border="0" alt="4 SSRS Matrix with fields" src="http://lh5.ggpht.com/-K2yTEqYorCY/UI8zUurXxrI/AAAAAAAAEcY/hQClXkr5o9g/4-SSRS-Matrix-with-fields_thumb2.jpg?imgmax=800" width="404" height="186"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;3) Add two rows outside group above the category row as shown below.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-DQ5oDDcySS4/UI8zWhKQXiI/AAAAAAAAEcg/Sm-C9WC4Dsc/s1600-h/5-Add-two-rows-outside-group-for-mat%25255B1%25255D.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="5 Add two rows outside group for matrix" border="0" alt="5 Add two rows outside group for matrix" src="http://lh5.ggpht.com/-D-62QEu9TAU/UI8zXmqjPcI/AAAAAAAAEco/3Enh9gU26sk/5-Add-two-rows-outside-group-for-mat.jpg?imgmax=800" width="404" height="204"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;4) Now you can delete the top row (but not the associated group) containing the Category and the Month Header as shown below&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-zDnZPNYpUZE/UI8zZvYTRyI/AAAAAAAAEcw/9HmqPQkrqSg/s1600-h/6-Delete-header-rows3.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="6 Delete header rows" border="0" alt="6 Delete header rows" src="http://lh4.ggpht.com/-nwb6FSnFD48/UI8zacZ7s5I/AAAAAAAAEc4/tIu1ufI8BVo/6-Delete-header-rows_thumb1.jpg?imgmax=800" width="404" height="242"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;5) Once that is done, drag and drop the month field to the textbox above the data value. Here, I just want to display the first three letters of the month (instead of having the month followed by year), so I am using the expression below directly:-&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;=left(Fields!Month.Value,3)&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;You might also want to do some quick formatting like hiding the textbox borders for the top row.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-LtWc54uV8G8/UI8zbOqseOI/AAAAAAAAEdA/P5y8Jui9HX4/s1600-h/7-Hiding-textbox-borders-and-setting%25255B2%25255D.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="7 Hiding textbox borders and setting month expression" border="0" alt="7 Hiding textbox borders and setting month expression" src="http://lh6.ggpht.com/-g1OIWT9PfnM/UI8zb-rrU4I/AAAAAAAAEdI/aDhNjvAotqU/7-Hiding-textbox-borders-and-setting.jpg?imgmax=800" width="254" height="347"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;6) Once this is done, the only part remaining is to make a chart, format it and then place it on the top right textbox. For that, drag and drop a stacked column chart outside of the matrix, and then drag Internet_Sales_amount on the Values, Month on the Category Groups and Category on the Series Groups as shown below.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/--KQzrRwpIlM/UI8zcS_fyII/AAAAAAAAEdQ/AEpSo0vMj-E/s1600-h/8-Chart3.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="8 Chart" border="0" alt="8 Chart" src="http://lh6.ggpht.com/--RGeij4Il0U/UI8zdSXxRsI/AAAAAAAAEdY/WSbwlHaICtE/8-Chart_thumb1.jpg?imgmax=800" width="404" height="189"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;7) Right click on the vertical axis, select the Vertical Axis Properties and then modify the expression for Maximum from Auto to the expression written below&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#9b00d3" size="2"&gt;=1.2 * max(Fields!Internet_Sales_Amount.Value, "DST_Main")&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-TDW9w_NqzNw/UI8zdxWe8II/AAAAAAAAEdg/hCYWLJutqB4/s1600-h/9-Chart-vertical-axis-max-property3.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="9 Chart vertical axis max property" border="0" alt="9 Chart vertical axis max property" src="http://lh5.ggpht.com/-kJlqZm0rEqs/UI8zepR7S1I/AAAAAAAAEdo/OJCKqgPI83Y/9-Chart-vertical-axis-max-property_t.jpg?imgmax=800" width="404" height="272"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;8) Delete the axis titles, chart titles and the horizontal axis from the chart&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-2yOBj2ABO8k/UI8zfP8Mt4I/AAAAAAAAEdw/ySidM1Ubv3o/s1600-h/10-Delete-Axis-titles3.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="10 Delete Axis titles" border="0" alt="10 Delete Axis titles" src="http://lh6.ggpht.com/-ThpSzprIq94/UI8zf4iXhQI/AAAAAAAAEd4/_w8QZQJelAo/10-Delete-Axis-titles_thumb1.jpg?imgmax=800" width="404" height="194"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;9) Hide the labels for the vertical axis.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-_9bm4oICJLc/UI8zgxcLmKI/AAAAAAAAEeA/ofQ-gNSEOf0/s1600-h/11-Hide-Labels3.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="11 Hide Labels" border="0" alt="11 Hide Labels" src="http://lh4.ggpht.com/-4xQPgUQ1ggA/UI8zhaUP84I/AAAAAAAAEeI/UkYHVeUENDg/11-Hide-Labels_thumb1.jpg?imgmax=800" width="404" height="219"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;10) We need to place this chart within the tablix and make it repeat for each of the month. But before that, we need to make sure that there are no white spaces within the chart area, and hence change the following properties for the Chart Area.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-FcxFWVxKeiw/UI8zh4RWyzI/AAAAAAAAEeQ/Euh_fhbH3ds/s1600-h/12-Custom-Inner-Plot-Position3.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="12 Custom Inner Plot Position" border="0" alt="12 Custom Inner Plot Position" src="http://lh3.ggpht.com/-wydhBzgRnwQ/UI8ziYzK0GI/AAAAAAAAEeY/D9SPNp1ASE8/12-Custom-Inner-Plot-Position_thumb1.jpg?imgmax=800" width="404" height="327"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;Also set the BorderStyle property for the Chart as None and disable the MajorTickMarks for the Vertical Axis. This will also help in making the charts look continuous.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;11) Now as a last step, we need to ensure that the vertical axis is only displayed for the first chart, Hence, set the LineStyle property for the vertical axis as shown below&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;=iif(Fields!Month.Value=First(Fields!Month.Value, "DST_Main"),"Solid","None")&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-TWI26Ii-GwE/UI8zi-I2CJI/AAAAAAAAEeg/L5qbp-DDkdg/s1600-h/13-Vertical-axis-property3.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="13 Vertical axis property" border="0" alt="13 Vertical axis property" src="http://lh4.ggpht.com/-XiK4U55WVQw/UI8zjpm-iSI/AAAAAAAAEeo/yNoGTLurUXI/13-Vertical-axis-property_thumb1.jpg?imgmax=800" width="304" height="182"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;12) Drag and drop the chart into the tablix cell&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-GfIArSYv_Ko/UI8zkHkhPMI/AAAAAAAAEew/MKpCsXivCw4/s1600-h/14-Chart-in-tablix4.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="14 Chart in tablix" border="0" alt="14 Chart in tablix" src="http://lh3.ggpht.com/-E7hov9Vos-w/UI8zkhN9LJI/AAAAAAAAEe4/QDV2Bh-FMoA/14-Chart-in-tablix_thumb2.jpg?imgmax=800" width="254" height="361"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;13) To add a color as a column next to the Category, we can use the Custom Code technique for consistent colors described &lt;/font&gt;&lt;a title="Specify Consistent Colors across Multiple Shape Charts (Report Builder and SSRS)" href="http://technet.microsoft.com/en-us/library/dd239350.aspx" target="_blank"&gt;&lt;font size="2"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;. Then ensure that the BackgroundColor property for the column as well as the series color for the chart is the expression below&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;=Code.GetColor(Fields!Category.Value)&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-j9vBPRRjoc0/UI8zlWD1YoI/AAAAAAAAEfA/iIdYi4ja_5k/s1600-h/15-Color-of-column-as-well-as-series%25255B2%25255D.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="15 Color of column as well as series" border="0" alt="15 Color of column as well as series" src="http://lh5.ggpht.com/-lWr3f9p3hCk/UI8zl_7-7kI/AAAAAAAAEfI/PHw7oPG4Jig/15-Color-of-column-as-well-as-series%25255B1%25255D.jpg?imgmax=800" width="404" height="222"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font color="#000000" size="2"&gt;14) Now preview the report and you will get the intended result. Change the parameter value from 2007 to 2008, and you will still see that the alignment is proper (even though the number of bars have changed)&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-ANyMnJ0eKSM/UI8znSCxxoI/AAAAAAAAEfQ/8Jn-gkoiH28/s1600-h/Charts-with-data-tables3.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Charts with data tables" border="0" alt="Charts with data tables" src="http://lh3.ggpht.com/-Fr4-SxdiOtk/UI8zo5Rst-I/AAAAAAAAEfY/b5tr5lRMCV0/Charts-with-data-tables_thumb1.jpg?imgmax=800" width="504" height="456"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;You can download the completed rdl file from &lt;a title="Download report file" href="https://docs.google.com/open?id=0B1k6zmQ4NXQld3dCbFZiTnRQZ1k" target="_blank"&gt;here&lt;/a&gt;. Now you know which post to point to incase someone asks on how to create charts with data tables in SSRS &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://lh4.ggpht.com/-TOD4JJF-wLk/UI8zqaIvwmI/AAAAAAAAEfg/gC64PFRqSoE/wlEmoticon-smile2.png?imgmax=800"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=PKeo5X6HU8k:ywh_DVaTlv0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=PKeo5X6HU8k:ywh_DVaTlv0:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=PKeo5X6HU8k:ywh_DVaTlv0:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/PKeo5X6HU8k" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/8403854563207246100/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2012/10/ssrs-charts-with-data-tables-excel-style.html#comment-form" title="13 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/8403854563207246100?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/8403854563207246100?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/PKeo5X6HU8k/ssrs-charts-with-data-tables-excel-style.html" title="SSRS Charts with Data Tables (Excel Style)" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-DwNDQFUjBCw/UI8zJu4O1xI/AAAAAAAAEbY/uNSNLAH08ok/s72-c/wlEmoticon-winkingsmile2.png?imgmax=800" height="72" width="72" /><thr:total>13</thr:total><feedburner:origLink>http://www.sqljason.com/2012/10/ssrs-charts-with-data-tables-excel-style.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYAQH4-eip7ImA9WhNTFkw.&quot;"><id>tag:blogger.com,1999:blog-4208106035476527184.post-6408066119304590979</id><published>2012-10-18T19:52:00.000-04:00</published><updated>2012-10-18T21:29:01.052-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-10-18T21:29:01.052-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PowerPivot" /><category scheme="http://www.blogger.com/atom/ns#" term="DAX" /><title>Difference from Maximum of Running Totals in PowerPivot</title><content type="html">&lt;div align="justify"&gt;&lt;font size="2"&gt;I don’t know how many of you are Formula1 fans here, but this season is pretty good. Sebastian Vettel and Fernando Alonso are going neck and neck for the title and there are just 4 races remaining. I try to follow F1 as much as I can, but had missed watching the last couple of races and there were some pivotal moments as Vettel took the lead from Alonso. I really missed knowing how they were doing at the end of each race and how far the other drivers were from the race leader. That is when I decided to relive the experience by mocking up the data in PowerPivot. &lt;/font&gt;&lt;/div&gt; &lt;div align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-zMLiX5T47Mw/UICrjfz46NI/AAAAAAAAEUY/6zKvmAPC1LQ/s1600-h/PowerPivot%252520Running%252520Total%252520Max%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="PowerPivot Running Total Max" border="0" alt="PowerPivot Running Total Max" src="http://lh3.ggpht.com/-SCgpiJaXEV8/UICrkElyYzI/AAAAAAAAEUg/ziYJW5mS6gw/PowerPivot%252520Running%252520Total%252520Max_thumb%25255B1%25255D.png?imgmax=800" width="423" height="261"&gt;&lt;/a&gt;&lt;/div&gt; &lt;div align="justify"&gt;&lt;font size="2"&gt;So what I want to do is to get a running total of the points for each driver across the races., so that I can see how each driver was doing throughout the season. Also, it would give me a better idea of their performance if I could get the difference of the points for each driver from the race leader at the end of that race. Interesting huh? &lt;/font&gt;&lt;/div&gt; &lt;div align="justify"&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&amp;nbsp;&lt;/div&gt; &lt;div align="justify"&gt;&lt;strong&gt;&lt;u&gt;&lt;font color="#c0504d" size="3"&gt;Source&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/div&gt; &lt;div align="justify"&gt;&lt;font size="2"&gt;The source for our exercise can be downloaded from &lt;/font&gt;&lt;a title="Download RaceData_Source.xlsx" href="https://docs.google.com/open?id=0B1k6zmQ4NXQlUklXdFV3OFNtT3M" target="_blank"&gt;&lt;font size="2"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt; and contains the following data:- &lt;/font&gt;&lt;/div&gt; &lt;div align="justify"&gt;&lt;font size="2"&gt;&lt;strong&gt;1. RaceFact&lt;/strong&gt;&lt;/font&gt;&lt;/div&gt; &lt;div align="justify"&gt;&lt;font size="2"&gt;This table contains the positions for each driver across all the races in this season. The columns are Driver, Race, Position and a flag whether they crashed or not.&lt;/font&gt;&lt;/div&gt; &lt;div align="justify"&gt;&lt;font size="2"&gt;&lt;strong&gt;2. RaceOrder&lt;/strong&gt;&lt;/font&gt;&lt;/div&gt; &lt;div align="justify"&gt;&lt;font size="2"&gt;This table contains all the completed races in this season and the order in which they happened. The columns are Race and Order.&lt;/font&gt;&lt;/div&gt; &lt;div align="justify"&gt;&lt;font size="2"&gt;&lt;strong&gt;3. Points&lt;/strong&gt;&lt;/font&gt;&lt;/div&gt; &lt;div align="justify"&gt;&lt;font size="2"&gt;This table contains the points for each position. The columns are Position and Points.&lt;/font&gt;&lt;/div&gt; &lt;div align="justify"&gt;&lt;font size="2"&gt;&lt;strong&gt;4. Driver&lt;/strong&gt;&lt;/font&gt;&lt;/div&gt; &lt;div align="justify"&gt;&lt;font size="2"&gt;This table contains the list of all drivers and just has one column - Driver.&lt;/font&gt;&lt;/div&gt; &lt;div align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-IXTWXpax6MM/UICrkgFFB3I/AAAAAAAAEUo/0elrQNh8A_Q/s1600-h/Race%252520data%252520model%25255B2%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Race data model" border="0" alt="Race data model" src="http://lh5.ggpht.com/-4oJ0wYu9_vI/UICrlRWnb2I/AAAAAAAAEUw/cEPGcwNYNRA/Race%252520data%252520model_thumb.jpg?imgmax=800" width="504" height="247"&gt;&lt;/a&gt;&lt;/div&gt; &lt;div align="justify"&gt;&lt;font size="2"&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt; &lt;div align="justify"&gt;&lt;strong&gt;&lt;u&gt;&lt;font color="#c0504d" size="3"&gt;Requirement&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/div&gt; &lt;div align="justify"&gt;&lt;font size="2"&gt;1. The running total of the points for each driver should be displayed race by race as shown below.&lt;/font&gt;&lt;/div&gt; &lt;div align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-nuBynzJ9G3A/UICrl14isDI/AAAAAAAAEU4/o0bpzsy0SSE/s1600-h/Running%252520Total%252520of%252520Points%25255B2%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Running Total of Points" border="0" alt="Running Total of Points" src="http://lh4.ggpht.com/-r3FH2WXtYuM/UICrmaoeeaI/AAAAAAAAEVA/yIPa-bTPG6s/Running%252520Total%252520of%252520Points_thumb.jpg?imgmax=800" width="504" height="127"&gt;&lt;/a&gt;&lt;/div&gt; &lt;div align="justify"&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/div&gt; &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;2. The difference of each driver from the leader (as of that race) should be displayed.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-O5D1JMNR4H4/UICrm2MZYHI/AAAAAAAAEVI/e5DCQsnzbJI/s1600-h/Diff%252520from%252520max%252520of%252520Running%252520Total%25255B2%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Diff from max of Running Total" border="0" alt="Diff from max of Running Total" src="http://lh5.ggpht.com/-vDLYMJKd8uE/UICrnqwu0oI/AAAAAAAAEVQ/V7pqdYdNY9k/Diff%252520from%252520max%252520of%252520Running%252520Total_thumb.jpg?imgmax=800" width="504" height="148"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font color="#c0504d" size="3"&gt;Implementation&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;1. Build the PowerPivot model for the RaceData as shown in the diagram above. For simplicity, I have already created the model in the source file available for download &lt;/font&gt;&lt;a title="Download RaceData_Source.xlsx" href="https://docs.google.com/open?id=0B1k6zmQ4NXQlUklXdFV3OFNtT3M" target="_blank"&gt;&lt;font size="2"&gt;&lt;strong&gt;&lt;u&gt;here&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;2. For creating the running total across the races, we will be following the technique detailed in my previous &lt;/font&gt;&lt;a title="Configurable Running Totals in PowerPivot" href="http://road-blogs.blogspot.com/2012/09/configurable-running-totals-in.html" target="_blank"&gt;&lt;font size="2"&gt;&lt;strong&gt;&lt;u&gt;blog&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;. For that, create 2 calculated columns in the RaceFact table called Points and Order respectively.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;=calculate(sum(Points[Points]))&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;=calculate(sum(Races[Order]))&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-6sQnA5joD2w/UICroBq9oUI/AAAAAAAAEVY/DPuNPwAISaM/s1600-h/calc%252520columns%25255B2%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="calc columns" border="0" alt="calc columns" src="http://lh5.ggpht.com/-kCNNnU5JqJs/UICroRY7NNI/AAAAAAAAEVg/U6HfijXF4BE/calc%252520columns_thumb.jpg?imgmax=800" width="504" height="192"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;Notice that the foreign keys in the fact table (Driver, Race, Position) are hidden as it is a best practice to hide the foreign keys. This way, the users will not get confused whether to use the columns in the master tables or the fact tables.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;3. For finding the running total, we can create a new measure with the below formula&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;strong&gt;RT_Points&lt;/strong&gt;:=calculate(sum(RaceFact[Points]), filter(Allexcept(RaceFact,Driver[Driver]), RaceFact[Order]&amp;lt;=Max(RaceFact[Order])))&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;When this measure is used against the drivers on rows and races on columns, it will display the running total of the points for each driver across the races. &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;4. Now for getting the difference of each driver from the leader, we need a measure which will give us the points of the race leader at the end of every race. This measure would be equal to the max of the running total that we just created and that should be the same for all drivers for a particular race. Create the measure with the DAX formula given below&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;strong&gt;MaxRT_Points&lt;/strong&gt;:=calculate(maxx(values(Driver[Driver]), [RT_Points]), All(Driver[Driver]))&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;The result is shown below&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-Bj_CkJ4UTiE/UICro-cQj2I/AAAAAAAAEVo/LZ65lw7wIow/s1600-h/MaxRTPoints%25255B2%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="MaxRTPoints" border="0" alt="MaxRTPoints" src="http://lh5.ggpht.com/-xMmi2kBzOsA/UICrpn5qb3I/AAAAAAAAEVw/UHDvxGAMKP8/MaxRTPoints_thumb.jpg?imgmax=800" width="504" height="222"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;5. Now all we have to do to get the final requirement is to subtract the MaxRT_Points measure from the RT_Points measure as shown below&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#9b00d3" size="2"&gt;&lt;strong&gt;DiffFromLeader&lt;/strong&gt;:=[RT_Points] - [MaxRT_Points]&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;The result is shown below&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-a44XdEtmxgE/UICrqBkl-kI/AAAAAAAAEV4/cnz2XTP3hOE/s1600-h/Diff%252520from%252520MaxRTPoints%25255B2%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Diff from MaxRTPoints" border="0" alt="Diff from MaxRTPoints" src="http://lh6.ggpht.com/-XRXd_TtlfbE/UICrqo5_TiI/AAAAAAAAEWA/O3VyeriZwtA/Diff%252520from%252520MaxRTPoints_thumb.jpg?imgmax=800" width="504" height="215"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;6. With a bit of formatting and adding a chart for the top 6 drivers, I can now clearly see how the battle for the top place has been going&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-hGKchpnkenI/UICrrGjw4II/AAAAAAAAEWI/PECdUGBUDv4/s1600-h/Chart%25255B3%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Chart" border="0" alt="Chart" src="http://lh3.ggpht.com/-Em4yfxeuM5c/UICrrnHIzbI/AAAAAAAAEWQ/NzeazoJPnOk/Chart_thumb%25255B1%25255D.jpg?imgmax=800" width="504" height="285"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="2"&gt;The final version of the PowerPivot file can be downloaded from &lt;a title="Download RaceData.xlsx" href="https://docs.google.com/open?id=0B1k6zmQ4NXQlVDJrdVpZX3c2ZHM"&gt;&lt;strong&gt;&lt;u&gt;here&lt;/u&gt;&lt;/strong&gt;&lt;/a&gt;. It is interesting to see that Fernando Alonso has been the most consistent driver, as can be seen from the above chart, even though he is in second place. With this information, I am going to bet my money on Alonso winning the Drivers championship (and not because I am a biased Ferrari fan :P). What do you reckon?&lt;/font&gt;&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=CbNtUMjPbEQ:m9VnbXXGJ-U:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/blogspot/Jason?a=CbNtUMjPbEQ:m9VnbXXGJ-U:3QFJfmc7Om4"&gt;&lt;img src="http://feeds.feedburner.com/~ff/blogspot/Jason?i=CbNtUMjPbEQ:m9VnbXXGJ-U:3QFJfmc7Om4" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Jason/~4/CbNtUMjPbEQ" height="1" width="1"/&gt;</content><link rel="related" href="http://road-blogs.blogspot.com/2012/10/difference-from-maximum-of-running.html" title="Difference from Maximum of Running Totals in PowerPivot" /><link rel="replies" type="application/atom+xml" href="http://www.sqljason.com/feeds/6408066119304590979/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqljason.com/2012/10/difference-from-maximum-of-running.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/6408066119304590979?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208106035476527184/posts/default/6408066119304590979?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Jason/~3/CbNtUMjPbEQ/difference-from-maximum-of-running.html" title="Difference from Maximum of Running Totals in PowerPivot" /><author><name>Jason Thomas</name><uri>https://plus.google.com/116725252481648231473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-HpuiU3CK-Fk/AAAAAAAAAAI/AAAAAAAAAAA/y1HHWuwIkq4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-SCgpiJaXEV8/UICrkElyYzI/AAAAAAAAEUg/ziYJW5mS6gw/s72-c/PowerPivot%252520Running%252520Total%252520Max_thumb%25255B1%25255D.png?imgmax=800" height="72" width="72" /><thr:total>3</thr:total><feedburner:origLink>http://www.sqljason.com/2012/10/difference-from-maximum-of-running.html</feedburner:origLink></entry></feed>
