我有一个像这样的 MDX 查询:
with
member [Measures].[Currency] as [Currency].[Code].Currentmember.Member_Key
member [Measures].[Date] as [Time].[Date].Currentmember.Member_Key
member [Measures].[Wholesale Price Totals] as [Measures].[Wholesale Price] * [Measures].[Net Sold Units]
select
{
[Measures].[Currency]
,[Measures].[Date]
,[Measures].[Sold Units]
,[Measures].[Wholesale Price Totals]
}
on columns,
ORDER
(
NONEMPTY
(
CROSSJOIN
(
{[Time].[Date].&[2013-02-26T00:00:00],[Time].[Date].&[2013-02-27T00:00:00]}
,EXCEPT([Currency].[Code].Members, [Currency].[Code].[All])
),
[Measures].[Sold Units]
),
[Measures].[Date], BASC
)
on rows
from MyCube
我需要将所有 [Sold Units](数量)* [Wholesale Price] 的总和作为 [Wholesale Price Totals]。像这样的查询检索所有已售单位的总和乘以 Wolesale 价格的总和,我需要将每个已售单位“单元格”的总和乘以它们的批发价格。
我从几天前就开始尝试这样做,这让我发疯了!
提前致谢!