PowerPivot Beta (CTP3) Tomorrow!

November 17, 2009

Yep.  11/18.  At http://powerpivot.com

If you’re arriving at my site for the first time, I suggest you check out the following for CTP3 inspiration:

What is PowerPivot?

Bing 48-Hour Case Study

Temperature Mashup Demo

The Great Football Project

And any questions, please post as comments :)


Introducing PowerPivot DAX Measures

November 15, 2009

Up until this point, I’ve just used DAX (PowerPivot’s extension to the Excel formula language) to create calculated columns in the PowerPivot window.

There’s a lot of utility in DAX calc columns, but that’s not where DAX really shines.  DAX measures let you do things in Pivot reports that simply weren’t possible in Excel before.

In the last video, I mentioned that merely showing raw sales amount didn’t really tell me whether my products sold better or worse in varying temperatures, since there are varying numbers of days of each temperature – perhaps the relatively low sales on Hot days is just because there weren’t many Hot days?

Enter DAX measures, a PowerPivot feature on par with relationships, slicers, and mashups.  But you might overlook them on a casual tour through the PowerPivot for Excel addin, since they live behind a single ribbon button.

DO NOT OVERLOOK DAX MEASURES!  There is literally a world of power lurking there.  I want to make absolutely sure that you grasp them – both their power as well as the “how to,” so I will spend the next couple of posts on them.

First, a word about videos vs. text and screenshots

Awhile back I asked for feedback on which format was preferred – text and screenshots, or videos.  Videos got more votes, by about two-to-one.  But my text-and-screenshot posts are getting more views than my video posts.

Clearly, those of us who are too busy to watch videos are also too busy to respond to surveys :)

I respect that – personally I think I prefer to consume text and screenshots over videos.  A video seems like a commitment, whereas scanning text is on my terms, even if on net I spend the same amount of time on either.  So here is my new philosophy, always subject to revision:

  1. I’m going to use videos whenever I am introducing something new, that benefits from the explanatory power of video
  2. Quick tips and tricks, as well as “power” techniques – I think I’m going to lean toward text and screenshots for these, unless it’s an in-depth technique
  3. Even when I use video, I’m going to try to summarize the content of the videos – not as an attempt to replicate their content, but more as a table of contents so you know why I think it’s worth your time to watch the video

So, I’ll share the videos first, and a summary after.

The Videos

 

 

(These are the fixed versions from 11/24/09)

Videos Summary

  1. Quick demo of conditional formatting and number formatting, and how surprisingly impactful they are
  2. The DAX Measure Dialog
  3. Qty per Day can be calc’d using =SUM([Quantity]) / COUNTROWS(RELATEDTABLE(DimDate))
    1. Simple formula, but how does it work?  Please consult…
  4. …The Five Golden (and Simple) Rules of DAX Measures
    1. Home Table = The table where the numeric columns are
    2. Columns always wrapped in aggregation functions like SUM()
    3. Calcs always are working against the source tables, not the pivot report
    4. Two phases:  Filter, then Calculate
    5. Think of things as if they happen cell-by-cell
  5. Once you grasp those, you can suddenly do AMAZING things

The temperature data from last night’s video

November 13, 2009

Just a reminder that the temperature data I used in last night’s video is available here.  Have fun :)

(I’ll post the full PowerPivot workbook, too, once CTP3 is released).


Excel blog: Dashboard improvements

November 12, 2009

The Excel blog has been on a tear recently.  Someone must’ve lit a fire under those guys.  (Colin?  Are you happy now?  C’mon, you’re excited!)

Great post on Dashboard-related improvements in 2010:

http://blogs.msdn.com/excel/archive/2009/11/11/excel-services-in-sharepoint-2010-dashboard-improvements.aspx


Temperature Mashup Example

November 12, 2009

With everyone getting their hands on CTP3, I decided to take a short break from the football project and show something else that may spark you to try things you otherwise might not.

So, let’s go behind the scenes of the Temperature Mashup example (that’s mentioned here and here).

Part One:

 

Part Two:

 

Recap

Briefly, here are the steps covered in the videos:

  1. Copying the temperature data from Excel and pasting as a new table in PowerPivot
  2. Using CONCATENATE to create “key” columns in both the Temperature and Sales tables
  3. Creating a relationship between those tables, using the key columns created in 2
  4. Demonstrating that the relationship enables slicing sales by temperature
  5. Using a nested IF formula to add a new column to the Temperature table, mapping granular average temperature values into the four buckets Cold, Cool, Warm, Hot
  6. Using that newly-calculated column to slice sales numbers instead

Next up…

Using DAX to create a “Sales per Day” measure! :)


Ugh

November 12, 2009

I’ve spent a lot of time the last two days recording PowerPivot videos – some for this site, and some for a special project.  Today when I uploaded them to YouTube, well, I discovered I’d used too fine a resolution, and you can’t read anything in the formula bar.

Are formulas really all that important in an Excel environment?  I was one sad dude when I saw what I’d done.

Good news:  re-recorded two of them.  They are uploading now.


Now THAT was bizarre…

November 12, 2009

Got frustrated with my upload speeds just now, decided to try my hand at the ever-popular “complaint tweet” – really it seems like this is 90% of the traffic on Twitter:

               image

The immediately realized I no longer live in Seattle, and have a different provider:

               image 

Turned out, immediately is not fast enough these days.  Literally one second later, this pops in:

               image

Never heard of this person.  Total shock.  Of course the only natural reply was:

               image

Serves me right for contributing to noise :)

I’ll say this, though:  that’s an amazing customer service method.  She’s just scanning all day for mentions of her company and pouncing on them to help.  Wow.  She then proceeded to tell me to check my modem’s web page for upload/download speed…

…but I think my first use of said modem is going to be to find a service with better upstream bandwidth :)


Does PowerPivot Need Office 2010 Deployed Everywhere?

November 12, 2009

(I’m working on several meaty videos at the moment and you should expect a lot of content to show up in the next few days.  In the meantime I’m gonna post a few quick-hitters to keep things fresh).

I get this question a lot:  “Wow, this PowerPivot stuff is hot, but it’s gonna be forever before I can get my company/customers to upgrade to Office 2010 – they just now finished rolling out 2007!”

Fear not.

Yes, the Excel power users that are designated as PowerPivot authors – they need Excel 2010.  But no one else does.  And even those Excel power users can install 2010 side by side with the corporate standard version of Office.

SharePoint 2010, of course, is required on the server, and typically, servers are faster to upgrade than desktops…  by a lot.  But even on the server, you don’t have to upgrade the entire SharePoint universe – as the Bing case study showed, you can deploy your own departmental PowerPivot server with ease.  (In Darinee’s case, it’s under her desk).


More Excel Services API Info

November 10, 2009

Two new links – one to the official Excel blog, and one to Shahar Prish’s personal blog.  Definitely check out Shahar’s blog – he’s a bit of a Renaissance man… one of the big brains behind Excel Services, but also one of the co-inventors of the method that enabled us to embed the PowerPivot db directly in the Excel file, which makes him a personal hero of mine :P

Excel blog post:  http://blogs.msdn.com/excel/archive/2009/11/09/excel-services-in-sharepoint-2010-rest-api-examples.aspx

Shahar’s blog:  http://blogs.msdn.com/cumgranosalis/


DAX: The =RELATED() Function

November 10, 2009

A quick update here on the football project (not really warranting a video).  The source db is awfully complex, and I’m in the process of wrapping my Excel-centric head around it.

For instance, in the Plays table, I’m trying to understand how many row constitute a single NFL play.  It’s not one row per play – no, that would be too simple.

Here, for instance, is a field that claims to be a unique play ID, but when I sort by it, it clearly isn’t:

                       PowerPivot PlayID Sorted  

With the table sorted, though, I notice that there are multiple SeasonNumber values corresponding to PlayUniqueID = 1:

                       PowerPivot Season Number 

…so I add a calc column concatenating the two, with renewed hopes for uniqueness:

PowerPivot New UniqueID

And…  curses, no such luck:

                     PowerPivot PlayGUID

At this point I realize that there really just are multiple rows per real event.  There are other columns in there that I suspect are crucial:  PlayerRole, PrimaryRole, etc. – all with integer values, sadly.

The good news, though, is that those integers are ID’s, and they reference into other tables that I are related to the Plays table.  Once those relationships are set up, I can exploit a new function added by PowerPivot.

To gain some more understanding about how this table works, I decide to lean on a familiar Excel trick and just add some more columns, VLOOKUP-style, but using the new DAX function named =RELATED()

PowerPivot =RELATED 1

            PowerPivot =RELATED 2

                           PowerPivot =RELATED 3

Be gone, VLOOKUP!

Check that out – it’s a single-parameter function!  I just say, “hey, go get me this column from this related table,” and off it goes to fetch the values that match the row from the current table, using the relationship.

The equivalent VLOOKUP would be something like:

    =VLOOKUP([PlayerID, CleanPlayers, 2, FALSE)

…and if the PlayerID column wasn’t the first column in the CleanPlayers table, well, it flat-out wouldn’t work.

Those three =RELATED() formulas yield:

PowerPivot =RELATED results

Ok, this gives me some hope of figuring things out.  (Steve Martin’s presence confuses me, though…)

I may or may not keep these columns in this table when I am done, since they are NOT required – I can build reports using the original fields in those other three tables, combined with fields from the Plays table, as demonstrated in previous posts.  This is just a temporary convenience for exploring this table.

Note that Excel users work like this all the time.  I kinda doubt DBA’s frequently add columns like this, expecting to just remove them shortly thereafter.  But here I am, working with an environment that conveys real database advantages, but I’m still doing my informal, explore-and-experiment Excel shtick.  I love it.

Next Football Post:  The Greatest Function in all of PowerPivot >>