Category Archives: Excel

Spreadsheet Design Standards

Now this is interesting. I remember searching a few years back for spreadsheet design patterns. That combination of keywords never led me to the Best Practice Modeling Standards upon which BPM – a company founded in 2002 by ex-Salomon Smith Barney investment bankers – provides its modeling products and services. The base version is apparently maintained by an independent Spreadsheet Standards Review Board:

Spreadsheet Standards Review Board Charter

  1. To promote the Best Practice Spreadsheet Modeling Standards to ensure that the Best Practice Spreadsheet Modeling Standards are recognized, used and accepted as the highest professional spreadsheet modeling standards in the world;
  2. To develop and maintain the Best Practice Spreadsheet Modeling Standards;
  3. To bring together global Spreadsheet modeling skills in order to develop and maintain the Best Practice Spreadsheet Modeling Standards;
  4. To facilitate and manage participation of interested parties and the general public in developing the Best Practice Spreadsheet Modeling Standards; and
  5. To evaluate proposals to add, delete or modify the Best Practice Spreadsheet Modeling Standards.

So you think you know Microsoft Excel?

Think again… I thought I knew my way around a fair share of Excel’s functionality but I’m not so sure anymore, having finally had a chance to play a bit with Microsoft’s new Excel add-ins: Data Explorer and GeoFlow. As a first test, I set out to create a map of some of my Outlook contacts – which took all of 5 minutes:

geoflow_test

This is barely scratching the surface and doesn’t even begin to address to power Excel has gained over the last couple years with the release of PowerPivot , its DAX language and PowerView.

What’s “a fair share of Excel’s functionality” anyway? All I can say is that with Excel as will all things, the more you learn, the more you realize how little you know…

Changing all pivot table data fields to sum

Ever needed to change a large number of pivot table data fields from Count to Sum? I used to have a macro just for that in my personal.xls file but my office workstation was upgraded a few weeks ago and I had forgotten to keep a copy of the code. I found the code again at vbaexpress.com and amended it slightly so that it applies to the currently selected pivot table only:

Sub ChangePivotTableFieldsToSum()

Dim pt As PivotTable

On Error Resume Next
Set pt = ActiveCell.PivotCell.PivotTable
On Error GoTo 0
If pt Is Nothing Then
    MsgBox “No PivotTable selected”, vbInformation, “Oops…”
    Exit Sub
End If

For Each pf In pt.DataFields
    If Not pf Is Nothing Then
        With pf
            .Function = xlSum
        End With
    End If
Next pf

End Sub

More fun with Excel’s CUBE functions

Posted here for future reference, here is neat little trick with Excel’s CUBE functions that enables building formula-based reports with dynamic members lists. Please refer to the original discussion on the discussion on the MSDN forum for context and additional ideas.

=IF(ROW(A2)-1 <= CUBESETCOUNT(AbsoluteReferenceToSet), CUBERANKEDMEMBER(“Connection”,AbsoluteReferenceToSet, ROW(A2)-1),””)

Not your father’s Excel

Colin Banfield has posted at PowerPivotPro a great overview at of how Microsoft is implementing an advanced data model object right into into Excel. According to Microsoft:

A Data Model is a new approach for integrating data from multiple tables, effectively building a relational data source inside the Excel workbook. Within Excel, Data Models are used transparently, providing data used in PivotTables, PivotCharts, and Power View reports. You can view, manage, and extend the model using the Microsoft Office PowerPivot for Excel 2013 add-in.

So yes, this basically means better integration of the current PowerPivot technology stack into Excel. The fundamental change, I believe, from an end-user’s standpoint is that it will be installed as a core functionality of Excel 2013 – without requiring the download of an add-in. Of course, this will enable the sophisticated analysis that you should expect of the xVelocity In-Memory Analytics Engine and the DAX language. But another benefit will be to allow many more users to leverage the power of Excel’s cube functions (it so happens that PowerPivotPro has another great article on that particular topic). xVelocity, together with cube functions and the slicers that appeared in Excel 2010 completely change the face of spreadsheet report design and ad-hoc analysis.

Parent-Child hierarchies in Excel!

This is really cool – I had completely missed it so far. The SQL Server 2012 release of PowerPivot for Excel includes several DAX functions (PATH, PATHCONTAINS, PATHITEM, PATHITEMREVERSE, and PATHLENGTH) dedicated to dealing with parent-child relationships. Kasper de Jonge (Program Manager at Microsoft Analysis Services) has a tutorial. Of course this is also covered in Microsoft SQL Server 2012 Analysis Services: The BISM Tabular Model by Marco Russo, Alberto Ferrari and Chris Webb but I’m not even halfway through the book yet;-)