使用以下 mdx,无论我使用或不使用 where 子句运行它,结果都是相同的:它返回层次结构中年的总 nbr。
with member nbYears as [Time].[Year].[Year].count
select nbYears on 0
from [Sales]
where [Time].[2007]
您可以使用现有的 MDX功能
WITH
member nbYears as (Existing [Time].[Year].[Year]).count
SELECT nbYears on 0
FROM [Sales]
WHERE [Time].[2007]