如何计算 DATES 层次结构中选定成员的"FactInternetSales"表中的销售总数?
(
[Order Date].[DATES].CURRENTMEMBER,
COUNT(DISTINCT([Fact Internet Sales].[Sales Order Number].[Sales Order Number]
)
这就是我目前所拥有的,但它不起作用:/
尝试在外面用额外的大括号计数来表示一组元组:
COUNT(
{
[Order Date].[DATES].CURRENTMEMBER
*
[Fact Internet Sales].[Sales Order Number].[Sales Order Number]
}
)
with set abc as
EXISTS([Fact Internet Sales].[Sales Order Number].[Sales Order Number],
[Order Date].[DATES].CURRENTMEMBER,
"Fact Internet Sales"
)
member [Measures].[Count]
AS Count(Distinct(abc))
SELECT [Measures].[Count] on 0
from [YourCube]
WHERE Order Date].[DATES].&[01/01/2015] --Some random value for slicer