Excel多维数据集值成员表达式 [英] Excel cubevalue memberexpression

查看:51
本文介绍了Excel多维数据集值成员表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Excel Powerpivot(2013)中使用CubeValue函数,想知道是否有可能在MemberExpression中使用运算符,尤其是检索小于或大于例如以下值的值:

I am using the CubeValue function in Excel Powerpivot (2013) and would like to know if it is possible to use operators in the MemberExpression, particularly to retrieve values less than or greater than, e.g:

= CUBEVALUE("PowerPivot数据","[度量].[CountofServiceID]","[数据].[ReportMonthNumber].& [< "& $ P $ 4&]")

=CUBEVALUE("PowerPivot Data","[Measures].[CountofServiceID]","[Data].[ReportMonthNumber].&[<"&$P$4&"]")

上面的语法(<)不正确,我想知道如何做?

The syntax above (<) is incorrect and I would like to know how to do this?

谢谢

推荐答案

通常,我发现分解多维数据集函数公式并使用cubevalue来简单引用其他字段更容易.您可以创建一个多维数据集来执行所需的操作.

In general, I find it is easier to break cube function formulas up and use cubevalue to simply reference other fields. You can create a cubeset to do what you need.

如果我们把它放在单元格A2中:

If we put this is cell A2:

=cubemember("PowerPivot Data", "[Measures].[CountofServiceID]")

在其他单元格中,假设A3使用以下公式:

In some other cell, let's say A3, use this formula:

=Cubeset("PowerPivot Data","{[Data].[ReportMonthNumber].[All].[1]:[Data].[ReportMonthNumber].[All].["& $P$4 & "].lag(1)}"," Reporting Months")

应包含您的值的单元格为:

The cell that should contain your value would be:

=cubevalue("PowerPivot Data", A2, A3)

这篇关于Excel多维数据集值成员表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆