Forum Discussion
Instert Row based on Condition
What is COID? To add records from one table to another, use Table.Combine(), which is the APPEND menu item on the Home ribbon.
Otherwise, I'll need a few more specifics about the goal and what you are using.
edhans I am trying to add a rows to the employee table when there is a vacanies in table 2.
COID is what they both are tied to.
- edhans6 years agoCommunity Champion
Ok. I'm not sure exactly what you mean by "Add" as adding is appending the data, and for the most part those do not have the same columns. However....
In table 2 I used the following Table.SelectRows logic:
= Table.SelectRows(#"Filtered Rows", each List.Contains(#"Table 1"[Facility], [Facility]))The first part of List.Contains() is a list of the values in the [Facility] column. The 2nd part is the [Facility] field in table 2. I had manually filtered out any Vacancy dates with null.
I then created a new table that combined table 1, and the filtered version of table 2. You cannot append table 2 directly to table 1 as that will create a circular reference.
So I get this table, which looks strange because the columns aren't the same.