我需要有一个超过10个数量的行的总销售价格。
下面的查询结果是总的销售价格。
SELECT {[Sell Price]} ON COLUMNS
FROM SALES
我必须用条件([Sell Quantity] > 10)来过滤上面的查询。
[Customer].[Customer Name].[Customer Name]
[Goods].[Goods Name].[Goods Name]
先谢谢你
编辑 示例数据如图所示
Customer Goods Quantity Price
-------------------------------------------------
A X 2 1000
B X 15 2000
C Y 20 3000
C X 3 6000
顾客和货物是尺寸。我需要第二行和第三行的总价格,因为这两行的数量超过了10。
我的预期结果是 5000.
你需要使用过滤功能。基于上面分享的模式,你的查询将是
Select
{
[Sell Price]
}on columns
from yourCube
where
{filter(
([Customer].[Customer Name].[Customer Name],[Goods].[Goods Name].[Goods Name]),
[Sell Quantity] > 10)}