Question

I recently engaged in OLAP and encountered the following problem.

First, some of the domain. There are auctions in which people can participate (Members). Auctions are created by users (Organizers) who turn belongs one of the Retailers. There is quite a long and complicated chain links:

Retailers <- Organizers <- Auctions <- Fact of participation -> Members 

All this is presented in the following tables DW:

DimRetailer (Id, Name) 
DimOrganizer (Id, Name, RetailerId) 
FactAuction (Id, DateTime, OrganizerId) 
FactParticipation (UserId, AuctionId) 
DimUser (Id, Name) 

Tables filled with the following data:

insert into DimRetailer values (1, 'Retailer 1'), (2, 'Retailer 2')
insert into DimOrganizer values (1, 'Organizer 1', 1), (2, 'Organizer 2', 1),
    (3, 'Organizer 3', 2), (4, 'Organizer 4', 2)
insert into DimUser values (1, 'Member 1'), (2, 'Member 2'), (3, 'Member 3')
insert into FactAuction values (1, '2014/04/20', 1), (2, '2014/04/21', 2),
    (3, '2014/04/20', 3), (4, '2014/04/21', 4)
insert into FactParticipation values (1, 1), (1, 2), (1, 3), (1, 4), (2, 2),
    (3, 3), (3,4)

I need to make the result table of the form:

    Member    |    Retailer    |    Organizer
-------------------------------------------------
   Member 1   |   Retailer 1   |   Organizer 1
              |                |   Organizer 2
              |   Retailer 2   |   Organizer 3
              |                |   Organizer 4
   Member 2   |   Retailer 1   |   Organizer 2
   Member 3   |   Retailer 2   |   Organizer 3
              |                |   Organizer 4

This table shows the auctions which Organizers participated member

Is it possible to do this in SSAS and in what direction to dig?

Was it helpful?

Solution

In SSAS terms I would create FactParticipation as a Measure Group (with a hidden Count Measure), then reference Members to Auctions via a "Many-to-Many Relationship" (via FactParticipation).

In DW terms this would be called a "Bridge Table".

Note some really old client tools like Excel 2003 struggle to query this design accurately.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top