Forum Discussion

LMSFWork's avatar
LMSFWork
New Member
3 years ago
Solved

Fixing a Many-to-Many relationship in data model

I am creating a data model to store Budget and Forecast information. The main Fact table stores basic information: Table ID, Division ID, Item ID, Date, Value.   The Item ID field relates to an Ite...
  • DataInsights's avatar
    DataInsights
    3 years ago

    LMSFWork,

     

    You can add additional CROSSFILTER arguments to CALCULATE. Each table with a relationship to Bridge_Table needs a CROSSFILTER argument in the measure. I'm not sure why filtering on Dim_Divisions doesn't work; the one-to-many relationship with Fact_LineItems should function normally. What exactly is the error?

     

    Value = 
    CALCULATE (
        SUM ( Fact_LineItems[Value] ),
        CROSSFILTER ( Dim_PLViews[Line ID], Bridge_Table[Line ID], BOTH ),
        CROSSFILTER ( Dim_LineTypes[Line ID], Bridge_Table[Line ID], BOTH )
    )