Excel 2007 数据透视表 - 连接到数据立方体时如何使用计算字段?
当数据源是 SSAS 数据多维数据集时,可以在 Excel 2007 数据透视表中使用计算字段吗?
我正在使用 Excel 2007 连接到 SQL Server 2005 数据立方体并通过数据透视表查看数据。 我想在数据透视表中创建计算字段,但“公式”按钮呈灰色。
如何创建计算字段(如果连接到数据立方体时可以)?
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) ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
此外,您可以使用“Office Web Components”而不是 Excel。 OWC 支持针对 OLAP 多维数据集的客户端公式。我不敢相信他们从本机 Excel 中删除了该功能。
additionally, you can use 'Office Web Components' instead of Excel. OWC supports client-side formulas against OLAP cubes.. I can't believe that they removed that feature from native Excel.
看来你不能。 这是我从 MSDN 得到的答案:
不可能。 所有聚合均由 Analysis Services 处理。 由于 XL 不负责聚合,因此无法进行自定义计算。HTH...Jim Thomlinson
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
您可以做到这一点,但这是有代价的。 您必须断开数据透视表与 SSAS 多维数据集的连接,然后才能像平常一样使用 Excel。 最好的第一步是让数据透视表完全符合您想要的外观。 从数据透视表功能区栏菜单中,单击选项子菜单。 单击 OLAP 工具按钮,然后单击“转换为公式”。
您将收到一条单向警告消息。 (点击保存的好时机)一旦断开连接,您将丢失所有漂亮的格式和拖放内容,但您始终可以通过手动格式恢复它们。 但您现在获得的是 Excel 功能。 现在将公式添加到您想要的位置。 当然,关键是确保您拥有新计算所需的元素。
它的好处是您可以保存并稍后重新打开。 您可以单击“刷新”以从 SSAS 服务器获取更新的数据。 华泰
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