How to create a relationship in power bi without unique values

In this Power BI article, we will see how to create a relationship in Power BI without unique values in Power Bi.

Create a relationship in power bi without unique values

Let us see how we can create a relationship in power bi without unique values in Power Bi.

In this example, I have used the Team Appearances table data, we will create a relationship between two tables (Team A & Team B) and team values. First, we will filter the unique team’s values from the two different tables using Power Bi Dax.

Team A

create a relationship in power bi without unique values example
create a relationship in power bi without unique values example

Team B

Example of create a relationship in power bi without unique values
Example of create a relationship in power bi without unique values
  • Open the Power Bi desktop and use the get data option to load the data into it. In the Model, the section makes the relationship between two columns.
  • Here you can see, the below screenshot displays many-to-many relationships with neither of the team having unique values.
How to create a relationship in power bi without unique values
How to create a relationship in power bi without unique values
  • Now to find the unique values between two tables, create a new table and apply the below-mentioned formula to retrieve unique column values from different tables:
Uniq_Team_Table = 
FILTER (
    DISTINCT (
        UNION (
            VALUES ( 'Team A'[Teams] ),
            VALUES ( 'Team B'[Teams] )
        )
    ),
    'Team A'[Teams] <> BLANK ()
)

Where,

  • Uniq_Team_Table = Table Name
  • Team A, Team B = Existing Table Name
  • Teams = Existing Column names

In the below screenshot, you can see that it displays the unique values from the two different tables.

create a relationship in power bi without unique values
create a relationship in power bi without unique values
  • Now in the Model section, create a relationship for the Teams presented in the Team A and Team B tables with the Unique Team Table.
  • It automatically creates one to one relationship for the Team A( Teams) and Team B( Teams ) values with Unique Team value as highlighted below:
How to create a relationship in power bi without unique values example
How to create a relationship in power bi without unique values example

This is how to create a relationship in power bi without unique values in Power Bi.

This Power BI article is illustrated how to create a relationship in Power BI without unique values in Power Bi.

You may like the following power bi tutorials:

>