- Microsoft Power BI Cookbook
- Brett Powell
- 127字
- 2025-04-04 18:18:12
Bidirectional cross-filtering for many-to-many
- Modify the cross filter direction of the relationship between Accounts and CustomerAccount to Both.
- Create a simple testing visual by customer to validate the impact of the bi-directional cross-filtering behavior.

Report Results with Bidirectional Cross-Filtering
- A report visual by customer will now correctly display both the total amount from the fact table ($1,400) and the amounts associated with each customer.
- A DAX alternative to the bidirectional relationship is the following:
M2M Tran Amount = CALCULATE([Tran Amount],SUMMARIZE(CustomerAccount,Accounts[Account ID]))
- SUMMARIZE() leverages the one-to-many relationships of Customers and Accounts to the bridge table and, via CALCULATE(), passes the filter context of Customers to the Accounts table, which filters transactions.
For similar many-to-many scenarios, bidirectional relationship is recommended over the DAX approach for manageability and performance reasons.