Forum Discussion
Pulling multiple columns from one (query, tables) into another according to multiple conditions
- 3 years ago
Hi @HMK
I've updated the PBIX for you in the attached. I've done it all in Power Query by creating a new key and then Appending the tables into a new table. PBIX file is attached.
The appended table (new table) looks like below. You can change / adjust as you want in Power Query, too, by just deleting whatever columns, etc, you don't want.
Let me know if you need anything else 🙂
Theo
Hi HMK
Just a heads up, it might be easier to answer your question with some sample data and by following these prompts: https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/2066986#M771079
In terms of your formula, is there a reason that the last AND condition is LEFT ( 'T1'[P02] = 'T2'[P02]... ? Normally the "LEFT" would require you to add 1) a number of characters and 2) a closing bracket ) to end it.
If you can provide some sample data, it may be easier to provide a response.
Cheers in advance!
Theo
Hi TheoC the 'T1'[P02] should start with 'T2'[P02] because 'T2'[P02] contains just the (purchase code) and 'T1'[P02] contains : (purchase code, name, city, date) without the comma symbol
I need the "First" = Left('T1'[P02], LEN('T2'[P02])).
here you can find the PBI file.
Thanks in Advance
- TheoC3 years ago
Community Champion
Hi HMK
I've updated the PBIX for you in the attached. I've done it all in Power Query by creating a new key and then Appending the tables into a new table. PBIX file is attached.
The appended table (new table) looks like below. You can change / adjust as you want in Power Query, too, by just deleting whatever columns, etc, you don't want.
Let me know if you need anything else 🙂
Theo