Forum Discussion

EB09's avatar
EB09
Frequent Visitor
3 years ago
Solved

Can't create relationship I need

Hi all,    I'm relatively new to Power BI, I am stuck with something I'm trying to do & wonder if anyone can help or has any suggestions.   Essentially I have a range of tables (imported from exc...
  • v-yanjiang-msft's avatar
    3 years ago

    Hi EB09 ,

    According to your description,  you are trying to create a relationship between your Employee Demographics table and your Sick Leave table in Power BI. If the only relationship it allows is many-to-many, it may be because there are duplicates of the same employee ID in the Sick Leave table.

    One possible solution could be to create a new table that combines the unique employee IDs from both tables. You could do this by using the "Append Queries" function in Power Query Editor. Once you have this new table, you can create a one-to-many relationship between it and both the Employee Demographics table and the Sick Leave table. Alternatively, you could try creating a calculated column in your Sick Leave table that uses the RELATED function to pull in the country information from the Employee Demographics table based on the employee ID. This would allow you to create a relationship between the two tables based on the employee ID column.

     

    Best Regards,
    Community Support Team _ kalyj

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