CUBE Functions 4: Deconstructing the PivotTable

Actually, before I talk about data connections, I want to cover one other way that users can author OLAP formulas ... users can create a PivotTable bound to an OLAP cube and then use the Field List to quickly add all the fields that they care about to thier PivotTable.  Then, with a single command, they can convert that PivotTable to a set of formulas, where each formula uses one of the new CUBE functions.  Fast and easy.

Once the Pivot Table has been converted to formulas, users can insert rows and columns, add their own calcs, and modify their work in all sorts of ways, using the converted PivotTable as a convenient starting point.  Note that conversion only works in one direction.  While you can convert a PivotTable to Formulas, you cannot convert a set of formulas to a PivotTable.

Imagine a report that shows several thousand members of a dimension, each member on one row of the report.  (As an example, this might be a report that has data for each of several thousand products, or for each of several thousand customers.)  Instead of authoring thousands of CUBE functions, it can be much easier and faster to create a PivotTable that contains the data you want in the report.  By bringing a single field into the report (such as Product or Customer) many thousands of values can also appear in that report. 

The command to “Convert to Formulas”, can be found on “Options” Tab under “PivotTable Tools”.  It is located under the command labeled “OLAP tools” as illustrated in the screenshot below (these are beta 1 visuals – not final design).


(Click to enlarge)

For a PivotTable that uses a ReportFilter, There are two options when this command is invoked.  By default, the row labels, column labels and data area of a PivotTable will be converted to Excel formulas that use CUBE functions.  If there was a ReportFilter, that filter will remain as it was and the CUBE functions will refer to it.  This permits the filter to be changed and all the formula values will be adjusted accordingly.  The other option is to convert the ReportFilter too, so that nothing of the original PivotTable remains.

Here’s the dialog that comes up to give you this choice:


To illustrate this capability, here is a PivotTable report where the Report Filter has not been converted along with the rest of the report.  In this example, users may still dropdown the filter in cell B1 and change its value.  When this cell is changed, the rest of the numbers will change with it.


(Click to enlarge)

Here is the same report, but in this case, everything was converted, including the ReportFilter.  There is no longer a dropdown in cell B1, but if the CUBEMEMBER function in that cell were changed, the rest of the report would reflect that change.


(Click to enlarge)

That wraps up OLAP formulas.  With this series of blog postings, I hope that I’ve illustrated how Excel 12 has added an important new feature that make it an incredibly powerful tool for analysis of OLAP data.  With improved PivotTables, new CUBE functions and the ability to convert from a PivotTable to formulas, there are lots of ways to build sophisticated reports based on the analytic data that is more and more commonly stored in multi-dimensional databases such as SQL Server 2005 Analysis Services.
 

 

Office Blogs Comments

Comments: (7) Collapse

  • David,

    I'm not able to view the images via my RSS reader, as well as directly through IE.

  • Phylyp, is there some chance that there is a firewall blocking images?  I have had one or two other people in that situation.

  • It's not a firewall problem. I'm at home in the same location where everything prior to February worked fine (and using a notebook that hasn't had any security fixes since your January posts either because I've been away).

    I see the first couple of lines only (for all these posts) even if I theoretically open the item itself.

    If however I access Comments, then I do see the entire text images and all.

  • Here's what I'm doing.

    1. I click on the date in the calendar.

    2. I get the header plus maybe a line. This is the same amount of info I get when I access the blog itself (when I get several such items) rather than the individual date.

    3. I can either click the title or comments in which case I see the full article.

    It used to be that the full article was visible when clicking the date in the calendar.

    It also used to be that then the title was linkable (in effect to itself) which was useful (not essential however because you can keep the link at the end of the item instead) when moving the text to OneNote 12.

    I hope this clarifies what differences I am seeing.

  • Mike, gotcha.  At some point (not sure exactly when - in January) there was an upgrade to our blogging software, and there were some changes in behaviour.  THat's what you are seeing.  If you want to see full articles with pictures, try using http://blogs.msdn.com/excel/

  • I'm already accessing the url you mention ...

    For what it's worth (and I know it will do no good, nor that you probably have anything to do with the blogging software) I prefer the old method as now I have (every time) one click extra in order to see anything useful.

    This is OK if I am looking at the entire web page containing all the recent blog items, but when I am specifically clicking on the date in the calendar and there is only one blog item for that date, then I want to see the entire item !!

    By all means submit this is a change request if you can. To my mind they went backwards with this latest update (at least in this respect)

    Mike

    P.S. Of course your texts are well worth that extra click (but still)!

  • Mike, I have sent feedback, but, as you say, I have nothing to do with the software.

Comments

Comments: (loading) Collapse