使用mdx數值函數如avg、count等的時候,通常會忽略空單元格!唯一的例外是count函數。它提供了includeempty 參數,指明是否包括空單元格。 1:non empty關鍵字 一般使用在軸級別。 select {[measures].[store sales]} on columns, non empty {[time2].[所有 time2].[1997].[q4].[10].children} on rows from sales 顯示1997年10月每日非空的銷售。 無non empty關鍵字則顯示所有銷售。 2:count 10月銷售日計數(無論有無銷售) with member [time2].[銷售日] as 'count([time2].[所有 time2].[1997].[q4].[10].children)' select {[measures].[store sales]} on columns, {[time2].[銷售日]} on rows from sales
10月銷售日計數(僅包括有銷售日期) with member [time2].[銷售日] as 'count([time2].[所有 time2].[1997].[q4].[10].children, excludeempty)' 3:sum和avg等函數 這些函數對于空單元,則忽略!(不轉換為0)