To remove some row in only one column not the entire rows in the table

Dear Teachers and Experts

According to the dataset exporting from the system, we need to remove some rows at only one column and keeping rows at the rest of the columns as below; in order to get the stock code matching to the stock description.

Can you kindly suggest if we can do that ability in Power Query in Power BI?

Thank you.
Query Function Ability.pbix (44.3 KB)
customer & product.xlsx (21.1 KB)

Hi @KhinKyeSin ,

Thanks for posting this question. I am not sure why do you want to do this as all other columns of first 3 rows are empty. I am not sure what do you want to achieve, but you can do 2 things here:

  1. remove top 3 rows
  2. use Fill-Up option and it will give you below output:

You can use fill up by following way:

Kind Regards,
Hafiz

1 Like

Actually I need to do that because for example, Stock ID for Syrups 120ml is KP001 and only remove the 3 rows at Stock ID will get this matching correctly.

The problem is such kind of removing rows is impacting to all the columns in the table…

It is really tricky.

Hi @KhinKyeSin ,

I have checked your data and it seems that you will encounter this issue multiple times during data load as you have same problems down in the excel sheet. For example, you have 555(2) Pharmacy,Ko Kyaw Naing,48 Pharmacy,Grape Drug Store etc. So, I think you can do replace in Power Query with the values that you want and then work on it. This is the simplest solution I can think of and there might be some other better solutions.

Kind Regards,
Hafiz

Hi @KhinKyeSin, we’ve noticed that no response has been received from you since a few days ago.

We just want to check if you still need further help with this post?

In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved.

Yes, please…

I finally figured out the solution by having another table from referencing the table we had earlier and get the index ( for the purpose of having code ) and merge back again…

Thank you for your support.