Forum Discussion

EuanHill's avatar
EuanHill
Regular Visitor
2 years ago
Solved

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,

     

    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.

     

     

2 Replies

  • 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.

     

     

    • EuanHill's avatar
      EuanHill
      Regular Visitor
      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!