Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi there,
I have one table with historic order information with order number as a primary key. It contains detailed order information
My second table also has order information with order number as a primary key. It contains limited order information.
I want to add all rows from the second table to the first table with just one rule:
If the order number already exists in the first table, then do not return any information from the second table. Or the other way around; if the order number exists in the second table but not in the first table, then add the row from the second table with that order number to the first table.
Would anyone know how to handle this?
Solved! Go to Solution.
HI @Anonymous,
I'd like to suggest you use except function to extract unmatched orderid between table1 and table2, then use union and filter function to union two tables.
Sample formula:
New Table = VAR idlist = EXCEPT ( VALUES ( Table2[OrderID] ), VALUES ( Table1[OrderID] ) ) RETURN UNION ( Table1, FILTER ( Table2, [OrderID] IN idlist ) )
Regards,
Xiaoxin Sheng
HI @Anonymous,
I'd like to suggest you use except function to extract unmatched orderid between table1 and table2, then use union and filter function to union two tables.
Sample formula:
New Table = VAR idlist = EXCEPT ( VALUES ( Table2[OrderID] ), VALUES ( Table1[OrderID] ) ) RETURN UNION ( Table1, FILTER ( Table2, [OrderID] IN idlist ) )
Regards,
Xiaoxin Sheng
Hi @v-shex-msft,
Thanks for getting me on the right way, that actually worked! Thanks for helping out & happy holidays!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
84 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |