Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
EuanHill
Regular Visitor

Linking two columns to the same column in a separate table

Hi All,

 

Apologies if this has already been asked, but I've checked a few posts and though they seem similar to my issue, they're not exactly the same as the problem I'm suffering!

 

I used to have a column called "Assigned To" which would list the Users assigned to a Task and if more than one user was assigned to the Task they are seperated by

 

"User 1; User 2"

 

The problem is whenever I have visuals and want to see what each are assigned to I see three bars/columns instead of two....

 

User 1 / User 2 / User 1;User 2

 

I aimed to fix this by Transforming the data so "Assigned to" seperated into more than 1 column if more than one assignee.

 

I then created a seperate table which would just list in one column the distinct names that appear in either of those columns.

 

I thought I could add two relationships where that table of Distinct Users is liked to "Assigned to.1" "Assigned to.2"

 

So I could then just use the One column to truely show all the tasks they were assigned to, but you can't have the two columns relating back to the 1.

 

Is there a way where I can achieve what I want? If there are cases where Users are in both columns, they just individually add to the total of their name referenced?

 

EuanHill_1-1708431185810.png

 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@EuanHill,

 

One approach would be to split the Assigned To column into rows using Power Query. This approach allows your model to scale without creating additional Assigned To.N columns. Be mindful of any metrics in the Tasks table; they will duplicate for each row created (e.g., Hours Worked) and will need to be properly handled.

 

DataInsights_1-1708439521094.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
DataInsights
Super User
Super User

@EuanHill,

 

One approach would be to split the Assigned To column into rows using Power Query. This approach allows your model to scale without creating additional Assigned To.N columns. Be mindful of any metrics in the Tasks table; they will duplicate for each row created (e.g., Hours Worked) and will need to be properly handled.

 

DataInsights_1-1708439521094.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Okay, I think this sounds like a good idea! I've never tried splitting into rows before & duplicating the other data. I should have a task ID that I can use to make sure the values are distinct, so I'll have a go and let you know how I get along!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.