Forum Discussion
Combining data sets with duplicate information (real tester!!)
Hi Anonymous
How does PQ know what ID to assign to each Name?
In Data Set 2 there are roles that are associated with multipe ID's. How do we know that a has ID 1 and b has ID 2? Why isn't it the other way around or some other combination?
What's the logic in assigning 1 to a , 2 to b , 3 to c etc?
Maybe a fuller explanation would shed light on this?
It's not as simple as just adding an Index column to Data Set 1 then deleting the Role column?
let
Source = Table.FromRecords({[Name = "a", Role = "x"],[Name = "b", Role = "x"],[Name = "c", Role = "y"],[Name = "d", Role = "y"]}),
#"Added Index" = Table.AddIndexColumn(Source, "Index", 1, 1, Int64.Type),
#"Removed Columns" = Table.RemoveColumns(#"Added Index",{"Role"})
in
#"Removed Columns"Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.
Hi PhilipTreacy
Thanks for getting back to me!
You are exactly right. There is no valid logic in the function I am performing.
I was hoping to find an answer which would perhaps exclude the Position ID if it had previously been included. However, I am not sure if this is an available function.
Thanks again!!!