Forum Discussion

MagicMind's avatar
MagicMind
Icon for Advocate II rankAdvocate II
2 years ago
Solved

Resolve - Can't determine relationships between the fields

I have 4 tables with the following relationships and slicers directions :   A - B : 1 to Many / Bidirectional B - C : 1 to Many / Bidirectional  B - D : 1 to Many / Bidirectional When I try to...
  • AmiraBedh's avatar
    2 years ago

    I recommend to change bidirectional relationships to single direction where possible, especially if the bidirectional filtering is not essential for your analysis.

    In the contrary case, you can create an explicit measures that use DAX to define the exact calculation and filtering behavior you need. This allows you to manually control the context propagation and filter application across your tables, bypassing some of the ambiguity that automatic filtering can introduce.

    For example, if you want to create a measure that aggregates data from table D based on filters applied to table A, you might use a DAX formula that explicitly navigates the relationships:

     

    Measure = CALCULATE(SUM(TableD[SomeColumn]), USERELATIONSHIP(TableA[KeyColumn], TableB[ForeignKeyColumn]), USERELATIONSHIP(TableB[KeyColumn], TableD[ForeignKeyColumn]))