Many to Many (N:N) relationship in Power BI
Many to Many (N:N) relationship between tables can have duplicate values on both sides. This is quite unusual, common relations have unique values on one side - Many to 1.
How to start?
Let´s have two tables, with plan and reality. We have to compare numbers from both tables (Revenue plan vs Total price), grouped by countries. I mean we have to see summaries of these values side by side.
How to create Many to Many relationship?
Just create the relationship between two columns, and set it (or leave it) as Many to Many.
Let´s see this very sharp warning - that you only should use Many to Many if you really understand it.
How it works in visualization?
The numbers will be in Values. In Rows (Axis...) will be the names of countries.
It is important, from which table these names are coming. Here we only have United States in reality, but not in plan. So if we used countries from the plan table, United States wouldn't appear (but appear in Total - so the total is "incorrect", because 159 + 110 is not 378):
But if you use countries from the table with real numbers, everything is perfect - because this table contains United States.