Search code examples
ssascubedimension

how to apply a filter (based on unrelated dimension )on a measure


I have a problem in my SSAS cube: There are two fact tables: OrderFact and PaymentFact, when I filter a date, I want to see payments related to filtered date orders. I designed a cube as follows, but I don’t get the desired result, can anyone help me out of this:

The cube


Solution

  • You will need to setup a many-to-many Date dimension. Basically you will have two measure groups in the cube. Then on the PaymentFact measure group you will go to the Dimension Usage tab of the cube designer and setup DateDim as a many-to-many relationship type using OrderFact as the intermediate measure group.

    For more background about many-to-many dimensions in SSAS, I would highly recommend this whitepaper: http://www.sqlbi.com/articles/many2many/

    The other option is to copy DateKey to PaymentFact in your ETL then make it a regular relationship. If a Payment only relates to one order, then that's feasible. If a payment relates to multiple orders, then use the many-to-many relationship.