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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
zb134
Helper I
Helper I

How to take filtered range of cells from a column and append to another column in the same table?

I have a table similar to the one shown below:

Col ACol BCondtion X
A123A3221
A322A3000
A232A1231

 

What I want to do is filter on Condition X where value is 0 and then append the corresponding Col B values to Col A for the same table. The result will look like below:

 

Col ACol BCondtion X
A123A3221
A322A3000
A232A1231
A300--

 

Basically, I am adding to Col A the values that are in Col B but not already in Col A.

I want to do this in Power Query (M code) NOT Dax

 

Hope that makes some sense.

 

Thanks in advance

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@zb134  There may be a more streamlined way to do this without duplicating the table, but off the top of my head I used the following steps:

  • Load the table
  • Make a duplicate of the table
  • Filter the duplicate table on Condition X = 0
  • Remove Column A and Column X from the duplicate table
  • Rename Col B in the duplicate table to Col A
  • Append the duplicate table to the original table

bchager6_0-1678045993075.png

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

@zb134  There may be a more streamlined way to do this without duplicating the table, but off the top of my head I used the following steps:

  • Load the table
  • Make a duplicate of the table
  • Filter the duplicate table on Condition X = 0
  • Remove Column A and Column X from the duplicate table
  • Rename Col B in the duplicate table to Col A
  • Append the duplicate table to the original table

bchager6_0-1678045993075.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.