Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想要与 t-SQL 中等效的 SUM 和 Group By。但是我还没有在网上找到答案。我的 MDX 退货有一些具有相同名称的记录。我想用汇总的度量来显示不同的名称,就像 SQL 中的按功能分组一样。
这似乎是一个共同的特点。谢谢。
在 AS 中定义度量时,您可以设置几种不同的方式,包括计数和求和。
假设您有一个产品维度和一个销售事实。按产品获取总销售额的简单查询如下所示。
SELECT {[Measures].[ItemCount], [Measures].[SalesDollars]} ON 0, [Products].[Products].children ON 1 FROM [CUBE]
这将为您提供示例输出,例如
Product Item Count Sales Dollars Bike 10 1000 Tire 3 650