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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
gtexeira
Frequent Visitor

Replace Cell Value with the Cell above

Hi 

 

I am trying to use Power BI query editor to update certain values with the value in the cell right above.  Here is the table:

invoice    product

2000       tire

2001       rim

2003       winshield

2004       Part

2005       seat

2006       Part

 

When ever the product colum contains a cell with Part, I need the power BI editor to replace it with the cell right above.  So the product for invoice 2004 should become windshield and the product for invoice 2006 should become seat.

 

I tried = Table.ReplaceValue(#"Filtered Rows3","Part",each [invoice],Replacer.ReplaceText,{"product"}) but the replaces the cell with the value from the invoice coulmn.

 

Can someone please help me

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @gtexeira ,

 

Right-click on a cell that contains "Part" and, from the context menu, select 'Replace Values'.

Type "null" (with no quotations) into the bottom field, like this:

BA_Pete_1-1694178077577.png

 

Now, select your [product] column and go to the Transform tab > Fill (dropdown) > Down.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

5 REPLIES 5
BA_Pete
Super User
Super User

Hi @gtexeira ,

 

Right-click on a cell that contains "Part" and, from the context menu, select 'Replace Values'.

Type "null" (with no quotations) into the bottom field, like this:

BA_Pete_1-1694178077577.png

 

Now, select your [product] column and go to the Transform tab > Fill (dropdown) > Down.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Thank you @BA_Pete

 

The above suggestion just replaces the Part with a null value.  It does not replace/change to the cell value above.

 

 

BA_Pete_0-1694178859988.png

 

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




That did it! my friend.

 

Thank you

 

Cool, glad that's worked for you.

Have a nice weekend 👍

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors