Forum Discussion
Find condition data between two tables in Power Query
Hello tod@s
Please, I need your help, I have two tables, the first named "System" and the second named "Manual", both tables have a column called "Aux", where in both some data are repeated, I need through a custom column in Power Query, search for the data of the table "System" in the table "Manual" through the column "Aux", in case I find the values I need to place a new column called "Status" in the "System" table that indicates "Do not add" if you find otherwise "Add".
Attached pbix drive. so they can access the editor.
https://drive.google.com/file/d/1g6o4DYppiU5q6kDMvBBWU7SaWL3JNJI8/view?usp=share_link
Greetings and thanks.
2 Replies
- amitchandakSuper User
Syndicate_Admin , refer if this approch can help
https://medium.com/@amitchandak/power-query-across-table-calculated-column-718809a97fd
- Syndicate_AdminAdministrator
Try with the formula you indicate in the link, but there is something I must be doing wrong, because it throws me all the rows like "do not add"
This is the code you enter
= Table.AddColumn(#"Merged column inserted", "Custom", each let
_col = [Aux],
_tabla = Table.SelectRows(MANUAL,each [Aux]),
_condicion = if _tabla = _col then "add" else "do not add"in
_condicion)Please if you can help me correct, maybe the whole code this evil