SSAS 多个度量值组合成一个度量值应该怎么实现?
lg314 2011-12-06 10:00:30 有两个表
Items(ItemId int pk,SellPrice numeric(12,2))
SellBills(BillId int pk,ItemId int fk Items(ItemId),SellQty int,RealSellPrice numeric(12,2))
select a.ItemId,sum((SellPrice-RealSellPrice)*SellQty) from Items a join SellBills b on a.ItemId=b.ItemId group by a.ItemId
我想得到一个差价的合计的度量,应该怎么实现?