excel - 在 CUBEVALUE() 中使用 OR()
问题描述
我正在尝试构建一个 CUBEVALUE() 公式,其中一个过滤器是 OR() 语句。我在网上搜索过,唯一相似的是这个未回答的问题。
我有以下格式的 COUBEVALUE() 公式:
CUBEVALUE("ThisWorkbookDataModel","measure","month","filter")
期望是这样的:
CUBEVALUE("ThisWorkbookDataModel","measure","month",OR("filter1","filter2","filter3"))
这是为了避免必须对 CUBVALUE 过滤器的所有变化求和,即
CUBEVALUE("ThisWorkbookDataModel","measure","month","filter1") + CUBEVALUE("ThisWorkbookDataModel","measure","month","filter2")
等等
有任何想法吗?
解决方案
Okay, so I have found an answer for this, so for anyone else who faces this challenge, formula format below:
CUBEVALUE("ThisWorkbookDataModel","measure","month","filter1",CUBESET("ThisWorkbookDataModel","filterA","filterB","filterC"))
Where filter1
is a 'constant' filter, and filters A,B, and C are variations of a filter within a given field. Using the CUBESET
seems to replicate the OR
required.