Forum Discussion
Instert Row based on Condition
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.
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.