Forum Discussion
Instert Row based on Condition
Anonymous how the table 1 columns are mapped to table 2, you can use UNION DAX function or you can append queries in Power Query
parry2k they are mapped using COID. I feel that i am going to need to do a Power Query but not sure the best way to go about it.
- edhans6 years ago
Community Champion
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.
- Anonymous6 years agoNot applicable
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 ago
Community 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.