views:

2905

answers:

2

Can you use calculated fields in Excel 2007 pivot tables when the data source is an SSAS data cube?

I am connecting to a SQL Server 2005 data cube with Excel 2007 and viewing the data though a pivot table. I want to create calculated fields in my pivot table, but the "Formulas" button is grayed out.

How do I do create calculated fields (if it is possible when connecting to a data cube) ?

+2  A: 

Looks like you can't. This is the answer I got from MSDN:

Not possible. All of the aggregations are handled by Analysis Services. Since XL is not in charge of the aggregations it has no ability to do custom calculations.HTH... Jim Thomlinson

Craig HB
+1  A: 

You can do this but it comes at a cost. You have to disconnect your pivot table from the SSAS cube and then you can use Excel as you normally would. The best first step is to get the pivot table exactly how you want it to look. From the pivot table ribbon bar menu, click the options sub-menu. Click the OLAP tools button and then click 'convert to formulas.'

You'll get a 1-way warning message. (good time to click save) Once you've disconnected you'll lose all of the pretty formatting and drag and drop stuff but you can always get that back with manual formatting. But what you gain now is Excel features. Now add the formulas where you want. The key of course is to make sure that you have the elements necessary for the new calculation.

Nice part about it is you can save and reopen later. And you can click refresh to get the data updated from the SSAS server. HTH

esabine