Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
anna93
Regular Visitor

Combine / Append tables based on condition

Hello all, 

 

I am trying to combine / append two tables with the same columns only if condition is met. For example, from table 1 below I would to like to get the rows in which Project Number = PO number and copy to the second table, what is the best to complete this in PowerQuery? I believe I would need an IF condition in the query but I am pretty new on this and I don't know how to write it. 

 

Thank you!

 

Project NumberFiscal YearFiscal PeriodCost ElementPO numberPo lineAmount
1510342020830306001352131
15103420202340099541532154
1510342020234009955456141
151034202023400995654646
1510342020234009958134164
151034202023400995954648
1510342020434009952542514
151034202043400995102132154
151034201975100151034110531
15103420191151001510341851
151034201912510015103411534
1510342020151001510341515
151034202025100151034121
1510342020751001510341541545
1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @anna93 

Create a new query and uncheck "enable load",

Capture4.JPGCapture5.JPG

Then in Table2, append query1

Capture6.JPG

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-juanli-msft
Community Support
Community Support

Hi @anna93 

Create a new query and uncheck "enable load",

Capture4.JPGCapture5.JPG

Then in Table2, append query1

Capture6.JPG

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-juanli-msft
Community Support
Community Support

Hi @anna93 

Is the table1 the same with table2?

 

Best Regards

Maggie

Hi Maggie, 

 

Yes both tables have same column names, it just have different data. 

Greg_Deckler
Community Champion
Community Champion

Just create a column:

= if [Project Number] = [Po number] then 1 else 0

Then just filter out the 0's


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi Greg - Appreciate your help on this but unfortuantely the below wouldn't work as I my question is around transferring rows of data from one table to another table if condition is met. 

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors