Reputation: 592
The fact table is quite simple :
Date Product Area
========== ======= ====
2010-01-01 P1 A
2010-01-01 P2 B
2010-01-02 P1 B
...
There is a large number of areas that we can't know in advance
The desired result is :
Date A B ...
========== == == ==
2010-01-01 1 1 ...
2010-01-02 0 2 ...
...
I'm looking for a query to do this job.
Upvotes: 0
Views: 474
Reputation: 11
I would write a query:
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
Jiri
Upvotes: 1
Reputation: 141
SELECT
[Dim product area].[Prod area].children ON 0,
[Dim periods].[Dates].children ON 1
FROM [cubename]
Upvotes: 0