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 TheoC ,
I updated the post and added some photos, also below you can find the example file from my drive.
need to use left because the 'T2'[P02] will containt the purschase code and 'T1'[P02] contains purchase code, date, city without cooma or space.
can I make the number of charecters in left statment equal to the number of charecters in 'T2'[P02] eg, LEFT ( 'T1'[P02] = 'T2'[P02], Len('T2'[P02])?
could you please check if this formula would be fine?
https://drive.google.com/drive/folders/1GFoD36fzRmCZ73O9Xwgs4dXceEvJleiL?usp=sharing
pull eact value of 'T2'[P05] and 'T2'[P07] to T1 IF
'T1'[P00] = 'T2'[P00] && 'T1'[P01] = 'T2'[P01] && (Left('T1'[P02]) = 'T2'[P02],Len('T2'[P02])), then Get values of columns 'T2'[P05] , 'T2'[P07] and insert in T1, else "null".
Thanks in advance