Forum Discussion
Custom Column - Value from other query
- Anonymous6 years agoJust do this:
Table.AddColumn(PrevStep, “NewColumnName”, each OtherTable[ColumnName]{2})
//{2} being the zero-based position of the other table’s item that you want. You could also do
each OtherTable[ColumnName] = “Some Team”, type text).
See the attached PBIX file here.
I'm not clear on the purpose here. Your table already had the club name so not sure why you wanted to get the club name merged from the other table.
If the goal is to get the club name there in the first place, you need some way to link the two tables. In other words, how should a computer know that Club 3 is what goes in your column? You've given it no other info to make that determination.
If I'm misunderstanding, please let me know. If the merge example is what you needed, please mark this as a solution.
Thanks again edhans
The reason I want to be able to get the club name from the other table is because I want to apply this step in multiple queries with different club names and be able to update the source data from say "Club 3" to "Manchester United" and have this flow through all the queries.
So essentially I am trying to find someway to link the two tables so the computer knows to look at Club 3 from the other table.
Thanks.
- edhans6 years agoCommunity Champion
But why do you expect it to know which is Club 3 vs Club 2? How are you linking the data?