Share via

How can I fix a semantic model relationship issue in Power BI?

Kalpesh Nardekar 0 Reputation points
2026-01-05T04:56:00.22+00:00

I have two tables:

Table 1: Contains a distinct Employee Code with an Active/Inactive flag for each employee.

Table 2: Contains Employee Code along with the courses pursued by employees under the company’s training programs.

When I try to create a relationship between these two tables in the Data Model view in Power BI Desktop, I face an issue.

I am attempting to create a one-to-one relationship, but the relationship cannot be activated because a single employee can have multiple training records in the second table.

Could you please suggest the correct relationship type or data modeling approach to resolve this semantic model issue?

Developer technologies | Transact-SQL
Developer technologies | Transact-SQL

A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.

0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Varsha Dundigalla(INFOSYS LIMITED) 4,780 Reputation points Microsoft External Staff
    2026-01-05T12:54:16.35+00:00

    Thank you for reaching out.

    This issue happens because the relationship type does not match the real data. Each employee appears only once in the Employee table, but the same employee can appear many times in the Training table if they attended multiple courses.

    Because of this, one‑to‑one is not correct and Power BI blocks or breaks the relationship.

    The correct approach is to treat the Employee table as a lookup (dimension) table and the Training table as a transactional (fact) table.

    Steps to fix it:

    1. Keep Employee Code unique in Table 1 (Employee table).
    2. Create a One‑to‑Many relationship:
      • One side: Employee table (Employee Code – unique)
        • Many side: Training table (Employee Code – repeated)
        1. Set cross filter direction to Single, from Employee → Training.
        2. Keep the relationship active.
    3. Use the Active / Inactive flag only as a filter (report filter, slicer, or DAX). Do not create a separate relationship for Active/Inactive.

    This follows the standard star schema model used in Power BI. It avoids ambiguity, keeps filters working correctly, and matches how Power BI expects semantic models to be built.

    references:

    Please let us know if you require any further assistance, we’re happy to help. If you found this information useful, kindly mark this as "Accept Answer". So that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.


  2. Q&A Assist
    2026-01-05T04:56:12.5166667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To resolve the issue with creating a relationship between your two tables in Power BI, you need to adjust the relationship type based on the data characteristics of your tables.

    Since Table 1 contains distinct Employee Codes with an Active/Inactive flag, and Table 2 contains multiple training records for each Employee Code, you should create a one-to-many relationship instead of a one-to-one relationship. In this case, Table 1 (the table with distinct Employee Codes) will be the "one" side, and Table 2 (the table with multiple training records) will be the "many" side.

    Here’s how you can set up the relationship:

    1. Go to the Modeling tab in Power BI Desktop.
    2. Select Manage relationships and then click on New.
    3. In the Create relationship dialog, select Table 1 as the first table and the Employee Code column as the first column.
    4. Select Table 2 as the second table and the Employee Code column as the second column.
    5. Ensure that the relationship type is set to one-to-many (1:*).
    6. Click OK to create the relationship.

    By doing this, you will allow Power BI to correctly relate the distinct Employee Codes in Table 1 to the multiple training records in Table 2, resolving the semantic model relationship issue.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.