<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.office.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Common Questions Around Excel 2007 OLAP PivotTables</title><link>http://blogs.office.com/b/microsoft-excel/archive/2008/02/06/common-questions-around-excel-2007-olap-pivottables.aspx</link><description>Today's author: Allan Folting, a program manager who works on the Excel team. I have gotten lots of questions from customers around specific functionality in Microsoft Excel 2007 PivotTables that is missing when connected to Microsoft SQL Server 2005</description><dc:language>en-US</dc:language><generator>Telligent Community 1.5.134.15456 (Build: 5.5.134.15456)</generator><item><title>re: Common Questions Around Excel 2007 OLAP PivotTables</title><link>http://blogs.office.com/b/microsoft-excel/archive/2008/02/06/common-questions-around-excel-2007-olap-pivottables.aspx#5930</link><pubDate>Tue, 04 Mar 2008 05:18:58 GMT</pubDate><guid isPermaLink="false">53587256-c606-4c9b-bad4-97c86b12ce62:5930</guid><dc:creator>AM</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have a question about OLAP HTTP Datasource and it&amp;#39;s related security. My Datasource is running on IIS6 under IUSR account. &lt;/p&gt;
&lt;p&gt;One of my users is exporting the &amp;quot;Export to Excel&amp;quot; from a OWC11 cube on the web and along with that comes the datasource. The user then sends the spreadsheet to some other user and that user has access to the cube as well. How do I secure it such that the first user is still able to download the Excel (with or without the connection string) such that the cube&amp;#39;s data is not available to the 2nd user?&lt;/p&gt;
&lt;p&gt;Can you guys help?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;AM&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.office.com/aggbug.aspx?PostID=5930" width="1" height="1"&gt;</description></item><item><title>re: Common Questions Around Excel 2007 OLAP PivotTables</title><link>http://blogs.office.com/b/microsoft-excel/archive/2008/02/06/common-questions-around-excel-2007-olap-pivottables.aspx#5931</link><pubDate>Fri, 29 Feb 2008 21:47:33 GMT</pubDate><guid isPermaLink="false">53587256-c606-4c9b-bad4-97c86b12ce62:5931</guid><dc:creator>BJ</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have a question about Pivot tables. &amp;nbsp;I want to change several &amp;quot;sum of ....&amp;quot; &amp;nbsp;to &amp;quot;average ...&amp;quot; with one move. &amp;nbsp;How can I do this? &amp;nbsp;When I select multiples and format to change to average it just changes one. &amp;nbsp;Can anyone help me?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.office.com/aggbug.aspx?PostID=5931" width="1" height="1"&gt;</description></item><item><title>re: Common Questions Around Excel 2007 OLAP PivotTables</title><link>http://blogs.office.com/b/microsoft-excel/archive/2008/02/06/common-questions-around-excel-2007-olap-pivottables.aspx#5932</link><pubDate>Thu, 28 Feb 2008 01:51:01 GMT</pubDate><guid isPermaLink="false">53587256-c606-4c9b-bad4-97c86b12ce62:5932</guid><dc:creator>Hank</dc:creator><description>&lt;p&gt;Hi Allan,&lt;/p&gt;
&lt;p&gt;I have a question regarding PivotTable security. &lt;/p&gt;
&lt;p&gt;We want to publish PivotTable reports with external connections to our AS2005 cubes to a document library on MOSS. We want to security trim external data based on users&amp;#39; permissions on the AS DB when they open the workbook either in browser or in Excel.&lt;/p&gt;
&lt;p&gt;I was able to make it to work in browser using refreshing on open Excel connection property and MOSS view items only permission based on recommendation in a January blog entry &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/excel/archive/2008/01/16/personalized-data-in-excel-services.aspx"&gt;blogs.msdn.com/.../personalized-data-in-excel-services.aspx&lt;/a&gt;. But then users would not be able to open the workbook in Excel any more, since if i give them the permissions then when refreshing on open failed, users still can see data originally published by the workbook authors. The behavior is same whether in browser or in Excel.&lt;/p&gt;
&lt;p&gt;It seems to me Excel refresh on open is not designed as a security mechanism, but rather as an convenience to synchronize data. But i notice there is another check box called remove data from external data range before saving the workbook. That appears exactly what we are looking for. But unfornately it is disabled for AS2005 data source (i checked it works with SQL data source)&lt;/p&gt;
&lt;p&gt;The bottom line is why it is disabled for olap data source and how can we accomplish our security requirements?&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;
&lt;p&gt;Hank&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.office.com/aggbug.aspx?PostID=5932" width="1" height="1"&gt;</description></item><item><title>re: Common Questions Around Excel 2007 OLAP PivotTables</title><link>http://blogs.office.com/b/microsoft-excel/archive/2008/02/06/common-questions-around-excel-2007-olap-pivottables.aspx#5933</link><pubDate>Fri, 22 Feb 2008 22:47:02 GMT</pubDate><guid isPermaLink="false">53587256-c606-4c9b-bad4-97c86b12ce62:5933</guid><dc:creator>Allan Folting (Microsoft)</dc:creator><description>&lt;p&gt;skyMike001, for OLAP PivotTables in Excel, members are listed in the order specified on the OLAP server by default (Data source order).&lt;/p&gt;
&lt;p&gt;For a time dimension, if you make sure to sort the attribute members by key (OrderBy=Key) on the OLAP server, and the Key is a DateTime type attribute, then Excel will list the members in chronological order.&lt;/p&gt;
&lt;p&gt;If you use the sorting options in Excel OLAP PivotTables however, member captions are retrieved as strings (even when they really are dates) and therefore sorting hierarchies with dates will typically not give you what you want but instead do a string based sort.&lt;/p&gt;
&lt;p&gt;So to control sort order for dates in Excel OLAP PivotTables, you typically need to rely on the sorting capabilities of the OLAP server.&lt;/p&gt;
&lt;p&gt;In non-OLAP PivotTables you can specify any sort order for items of fields by moving them around manually and that order will be used in the report filter field drop down as well as on rows and columns. Also, in non-OLAP PivotTables, date values are treated as dates (not strings) so sorting in the PivotTable will sort chronologically (ascending or descending depending on what you choose).&lt;/p&gt;
&lt;p&gt;You can also manually specify the sort order for members of an OLAP hierarchy on rows and columns in the PivotTable but when the hierarchy is moved to the report filter area, this order is not used since the filter drop down is populated by a query to the OLAP server when it is opened. Therefore members are always listed in the order specified on the OLAP server in the filter drop downs.&lt;/p&gt;
&lt;p&gt;As you discovered, in the object model for OLAP PivotTables, CubeFields represent hierarchies and PivotFields represent levels within hierarchies. Excel does not keep track of all levels of all hierarchies at all times so for hierarchies not added to the PivotTable yet, you need to use the CreatePivotFields method to create PivotFields representing levels of those hierarchies if you want to work with them.&lt;/p&gt;
&lt;p&gt;Here is an object model example of sorting and filtering a hierarchy before adding it to the PivotTable (and then adding it to rows at the end):&lt;/p&gt;
&lt;p&gt;Sub SortAndFilter()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; Dim myPT As PivotTable&lt;/p&gt;
&lt;p&gt; &amp;nbsp; Set myPT = ActiveSheet.PivotTables(&amp;quot;PivotTable1&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; With myPT&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; .CubeFields(&amp;quot;[Customer].[Customer Geography]&amp;quot;).CreatePivotFields&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; .PivotFields(&amp;quot;[Customer].[Customer Geography].[Country]&amp;quot;).AutoSort xlDescending, &amp;quot;[Customer].[Customer Geography].[Country]&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; .PivotFields(&amp;quot;[Customer].[Customer Geography].[Country]&amp;quot;).VisibleItemsList = Array(&amp;quot;[Customer].[Customer Geography].[Country].&amp;amp;[United States]&amp;quot;, &amp;quot;[Customer].[Customer Geography].[Country].&amp;amp;[Germany]&amp;quot;, &amp;quot;[Customer].[Customer Geography].[Country].&amp;amp;[Australia]&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; .PivotFields(&amp;quot;[Customer].[Customer Geography].[State-Province]&amp;quot;).VisibleItemsList = Array(&amp;quot;&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; .PivotFields(&amp;quot;[Customer].[Customer Geography].[City]&amp;quot;).VisibleItemsList = Array(&amp;quot;&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; .PivotFields(&amp;quot;[Customer].[Customer Geography].[Postal Code]&amp;quot;).VisibleItemsList = Array(&amp;quot;&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; .PivotFields(&amp;quot;[Customer].[Customer Geography].[Customer]&amp;quot;).VisibleItemsList = Array(&amp;quot;&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; .CubeFields(&amp;quot;[Customer].[Customer Geography]&amp;quot;).Orientation = xlRowField&lt;/p&gt;
&lt;p&gt; &amp;nbsp; End With&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.office.com/aggbug.aspx?PostID=5933" width="1" height="1"&gt;</description></item><item><title>re: Common Questions Around Excel 2007 OLAP PivotTables</title><link>http://blogs.office.com/b/microsoft-excel/archive/2008/02/06/common-questions-around-excel-2007-olap-pivottables.aspx#5934</link><pubDate>Fri, 22 Feb 2008 20:41:31 GMT</pubDate><guid isPermaLink="false">53587256-c606-4c9b-bad4-97c86b12ce62:5934</guid><dc:creator>Allan Folting (Microsoft)</dc:creator><description>&lt;p&gt;Eric, creating session members/calculations are supported in Analysis Services local cubes as long as all the entities referenced by the expressions for these members/calculations are included in the local cube definition.&lt;/p&gt;
&lt;p&gt;I just created a local cube from within Excel 2007 based on the Adventure Works cube and then I used the Excel object model code that you tried and I was able to create the calculations just fine. &lt;/p&gt;
&lt;p&gt;If you can provide some more details on the specific steps you take when creating the local cube etc. I will do my best to try to help out.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.office.com/aggbug.aspx?PostID=5934" width="1" height="1"&gt;</description></item><item><title>Excel 2007 OLAP PivotTables - Calculated Members</title><link>http://blogs.office.com/b/microsoft-excel/archive/2008/02/06/common-questions-around-excel-2007-olap-pivottables.aspx#5935</link><pubDate>Tue, 19 Feb 2008 16:00:16 GMT</pubDate><guid isPermaLink="false">53587256-c606-4c9b-bad4-97c86b12ce62:5935</guid><dc:creator>Eric</dc:creator><description>&lt;p&gt;I got a chance to experiment a little more.&lt;/p&gt;
&lt;p&gt;Even Using OLAP 8.0 or 9.0 in Excel 2007 (or 2003), with or without &amp;quot;Show calculated members from OLAP server&amp;quot; checked, I can&amp;#39;t get this to work with my offline cube.&lt;/p&gt;
&lt;p&gt;If I look at the DLL source of the error for the pvt.CalculatedMembers.Add line, it tells me &amp;quot;syntax error in axis definition&amp;quot; (if I try strFormula = &amp;quot;[Measures].[Internet Sales Amount]&amp;quot;) or &amp;quot;syntax error, did not expect end of statement but found extra text near &amp;quot;+1&amp;quot; &amp;quot; (for example, if I tried strFormula = &amp;quot;1+1&amp;quot;.&lt;/p&gt;
&lt;p&gt;So unless it&amp;#39;s some OLAP driver setting issue somewhere, I&amp;#39;m guessing this is a limitation of offline cubes? (at least those created with the Office Offline Cube Wizard)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.office.com/aggbug.aspx?PostID=5935" width="1" height="1"&gt;</description></item><item><title>re: Common Questions Around Excel 2007 OLAP PivotTables</title><link>http://blogs.office.com/b/microsoft-excel/archive/2008/02/06/common-questions-around-excel-2007-olap-pivottables.aspx#5936</link><pubDate>Mon, 18 Feb 2008 17:09:44 GMT</pubDate><guid isPermaLink="false">53587256-c606-4c9b-bad4-97c86b12ce62:5936</guid><dc:creator>Eric</dc:creator><description>&lt;p&gt;I&amp;#39;m trying this out with Excel 2003 and an offline OLAP cube (.cub file) generated via Microsoft Query&amp;#39;s Offline Cube Wizard, and, unfortunately, it isn&amp;#39;t working out so well.&lt;/p&gt;
&lt;p&gt;For your code that shows:&lt;/p&gt;
&lt;p&gt;Set pvt = Sheet1.PivotTables(&amp;quot;PivotTable1&amp;quot;)&lt;/p&gt;
&lt;p&gt;strName = &amp;quot;[Measures].[Internet Sales Amount 25 %]&amp;quot;&lt;/p&gt;
&lt;p&gt;strFormula = &amp;quot;[Measures].[Internet Sales Amount]*1.25&amp;quot;&lt;/p&gt;
&lt;p&gt;pvt.CalculatedMembers.Add Name:=strName, Formula:=strFormula, Type:=xlCalculatedMember&lt;/p&gt;
&lt;p&gt;I can only get a constant integer measure to be added successfully. That is, if I set strFormula = 1, or strFormula = &amp;quot;2&amp;quot;, then it works. If I try something as simple as strFormula = &amp;quot;1+1&amp;quot;, or strFormula = &amp;quot;[Measures].[Internet Sales Amount]&amp;quot;, or strFormula = 2.52 though, it fails.&lt;/p&gt;
&lt;p&gt;Does anyone know if this is a limitation of Excel 2003, the Offline Cube Wizard, or both?&lt;/p&gt;
&lt;p&gt;I&amp;#39;m searching for a way to get average and standard deviation calculations in the cube using these technologies.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.office.com/aggbug.aspx?PostID=5936" width="1" height="1"&gt;</description></item><item><title>OLAP PivotTable filter ordering</title><link>http://blogs.office.com/b/microsoft-excel/archive/2008/02/06/common-questions-around-excel-2007-olap-pivottables.aspx#5937</link><pubDate>Sun, 17 Feb 2008 22:15:33 GMT</pubDate><guid isPermaLink="false">53587256-c606-4c9b-bad4-97c86b12ce62:5937</guid><dc:creator>skyMike001</dc:creator><description>&lt;p&gt;Hi There&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve tried to get help on this elsewhere with no joy. I have a pivot table based on a SQL Server 2005 cube. At the moment the database behind the cube has dates until the end of this year in descending order. When the data is loaded into a pivottable and the dates are selected as a report filter, they are not in descending order. I would also like a way to stop the dates in the future from being displayed in the report filter. &lt;/p&gt;
&lt;p&gt;1.	Timothy Zapawa’s book “Excel 2007 Advanced Report Development” pp276 said I could drag that field into the row labels or column labels area, sort it there, then drag it back to the report filter. This hasn’t worked. &lt;/p&gt;
&lt;p&gt;2. Another option was to apply filters by manually adding the cube field to the pivottable (see &lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com.en-us/library/bb256319.aspx"&gt;msdn2.microsoft.com.en-us/.../bb256319.aspx&lt;/a&gt; and &lt;a rel="nofollow" target="_new" href="http://ssas-info.com/RamunasBalukonisBlog/?p=25"&gt;ssas-info.com/RamunasBalukonisBlog&lt;/a&gt;) &lt;/p&gt;
&lt;p&gt;First of all, I’ve needed to get a list of all of the programmatic field names for the pivottable. This didn’t work because the cube based fields aren’t referred to as PivotFields …(Application Error 1004)&lt;/p&gt;
&lt;p&gt;Sub List_PvtFields()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Dim pvtTable As PivotTable&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Dim pvtField As PivotField&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Dim objNewSheet As Object&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Dim intRow As Integer&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Set objNewSheet = Worksheets.Add&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;objNewSheet.Activate&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;intRow = 1&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Set pvtTable = ActiveSheet.PivotTables(1)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;For Each pvtField In pvtTable.PivotFields&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;objNewSheet.Cells(intRow, 1).Value = pvtField.Name&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;intRow = intRow + 1&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Next pvtField&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
&lt;p&gt;The following did work…&lt;/p&gt;
&lt;p&gt;Sub list_cube_fields()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Dim objNewSheet As Object&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Dim intRow As Integer&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Dim objCubeFld As Object&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Set objNewSheet = Worksheets.Add&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;objNewSheet.Activate&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;intRow = 1&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;For Each objCubeFld In Worksheets(&amp;quot;DailyGraph&amp;quot;).PivotTables(1).CubeFields&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;objNewSheet.Cells(intRow, 1).Value = objCubeFld.Name&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;intRow = intRow + 1&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Next objCubeFld&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
&lt;p&gt;Next I followed (see &lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com.en-us/library/bb256319.aspx"&gt;msdn2.microsoft.com.en-us/.../bb256319.aspx&lt;/a&gt;) and I think that the following line worked….&lt;/p&gt;
&lt;p&gt;ActiveSheet.PivotTables _(&amp;quot;ptDailyGraph&amp;quot;).CubeFields(&amp;quot;[Date].[Year]&amp;quot;).CreatePivotFields&lt;/p&gt;
&lt;p&gt;So this should have added this cube field as a pivottable field. But this next line doen’t work…(I get “RunTime Error 438 – Object does not support this property or method”)&lt;/p&gt;
&lt;p&gt;ActiveSheet.PivotTables(&amp;quot;ptDailyGraph&amp;quot;).PivotField(&amp;quot;[Date].[Year]&amp;quot;).VisibleItemsList = Array(&amp;quot;[Date].[Year].&amp;amp;[2006]&amp;quot;, &amp;quot;[Date].[Year].&amp;amp;[2007]&amp;quot;)&lt;/p&gt;
&lt;p&gt;I’ve also tried this line…and got the same error message…&lt;/p&gt;
&lt;p&gt;ActiveSheet.PivotTables(&amp;quot;ptDailyGraph&amp;quot;).PivotField(&amp;quot;[Date].[Year]&amp;quot;).AutoSort &lt;/p&gt;
&lt;p&gt;xlDescending&lt;/p&gt;
&lt;p&gt;Any ideas?&lt;/p&gt;
&lt;p&gt;-- &lt;/p&gt;
&lt;p&gt;Thanks a lot.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.office.com/aggbug.aspx?PostID=5937" width="1" height="1"&gt;</description></item><item><title>re: Common Questions Around Excel 2007 OLAP PivotTables</title><link>http://blogs.office.com/b/microsoft-excel/archive/2008/02/06/common-questions-around-excel-2007-olap-pivottables.aspx#5938</link><pubDate>Sun, 10 Feb 2008 20:45:16 GMT</pubDate><guid isPermaLink="false">53587256-c606-4c9b-bad4-97c86b12ce62:5938</guid><dc:creator>Marco Russo</dc:creator><description>&lt;p&gt;One year ago I opened an incident to fix the AS2005 SP2 issues with filtering calculated members. After a few months, the answer was that it was a &amp;quot;by design&amp;quot; behavior and no fix would be created. One year after, I see that this is still an issue affecting more and more people and I still think MS had not handled this issue in a good way, limiting the adoption of Excel 2007 and sometimes of SSAS 2005.&lt;/p&gt;
&lt;p&gt;The fact that there is not a real fix for a breaking change introduced by a Service Pack one year ago is really unbelieavable. Workaround like that of using an older version of the pivot table cannot be considered a workaround at all!&lt;/p&gt;
&lt;p&gt;Marco&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.office.com/aggbug.aspx?PostID=5938" width="1" height="1"&gt;</description></item></channel></rss>