事实表非常简单:
Date Product Area
========== ======= ====
2010-01-01 P1 A
2010-01-01 P2 B
2010-01-02 P1 B
...
我们事先无法知道很多领域
期望的结果是:
Date A B ...
========== == == ==
2010-01-01 1 1 ...
2010-01-02 0 2 ...
...
我正在寻找一个查询来完成这项工作。
答案 0 :(得分:1)
我会写一个查询:
WITH MEMBER X AS
COUNT([DimProduct].[Product].[Product])
SELECT
{[DimProduct].[Product area].[product area]} ON COLUMNS,
[Dim date].[date].[date]
ON ROWS
FROM [Cube name]
WHERE X
伊日
答案 1 :(得分:0)
Godeps.json