SELECT NONEMPTY 的用法

Usage of SELECT NONEMPTY

我注意到在 MDX 中获取 column/row 的默认值(从 Excel 生成)是:

SELECT
    NON EMPTY { 
        ...
    } ON COLUMNS, 
    NON EMPTY { 
        ...
    } ON ROWS 
FROM [Model] 

为什么这是默认行为?实际使用中什么时候会出现空列或空行?

此外,它说 NONEMPTY 是文档中的正确名称,但是当我使用它时出现语法错误。 NONEMPTYNON EMPTY 之间有什么区别 -- 是否已弃用?

正如您在文档中发现的那样,Nonempty 是函数,因此它需要用括号括住集合表达式:NONEMPTY(set_expression)。 NON EMPTY 是关键字。

The big difference between the NON EMPTY keyword and the NONEMPTY function is when the evaluation occurs in the MDX. The NON EMPTY keyword is the last thing that is evaluated, in other words after all axes have been evaluated then the NON EMPTY keyword is executed to remove any empty space from the final result set. The NONEMPTY function is evaluated when the specific axis is evaluated.