Forum Discussion

RootOfMinusOne's avatar
RootOfMinusOne
Frequent Visitor
3 years ago

Bidirectional relationship vs Many-2-Many- what to choose

In my use case, a product may belong to many brands and the same time, and I need Brand to filter Product.

 

So I can figure out two ways to solve this

1: I set fitler cardinality to  "Many-to-many", and then I simply chose the correct cross filter direction. (green circle in pic below)

2: I set fitler cardinality to "one-to-many" and cross filter direction to "Both" (blue circle)

 

Both of those solution have drawbacks, what would you choose?

 

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi RootOfMinusOne ,

    I am sorry I am late.

    You activate bi-directional filtering in a measure definition by using the CROSSFILTER DAX function instead. The CROSSFILTER function can be used to modify filter directions—or even disable the relationship—during the evaluation of an expression.

     

    More details:Bi-directional relationship guidance - Power BI | Microsoft Learn

     

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Rongtie

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.