Power Query - Fill down/up does not work with csv file

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
I have a csv file (see the link below please). When I open a new excel file then Data-->Get Data --> From CVS, it will be loaded to PowerQ editor but the empty cells are blank (nothing inside them, no NULL keyword). When I tried to Trasform-->Fill down/Up nothing changed (the first column was highlighted).

Then what I did, I open it the CSV file and then clicked on Data-->From Table/Range, the table was loaded to Power Query editor and the empty cells in the first column were filled with "null" keyword and Fill-->Down worked file.

Why it did not work when I tried to GetData from CSV? Thank you so much.

 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
When I downloaded your file, it was a PDF and not a CSV, however, it did come in with empty cells in Column A. What I did was highlight the column in the PQ editor and on the transform tab, replace values. Replace and left the top box blank and put null (with lower case) in the replace box. Now I was able to fill down.

Power Query:
= Table.ReplaceValue(#"Changed Type","",null,Replacer.ReplaceValue,{"Sales Rep"})
 
Upvote 0
When I downloaded your file, it was a PDF and not a CSV, however, it did come in with empty cells in Column A. What I did was highlight the column in the PQ editor and on the transform tab, replace values. Replace and left the top box blank and put null (with lower case) in the replace box. Now I was able to fill down.

Power Query:
= Table.ReplaceValue(#"Changed Type","",null,Replacer.ReplaceValue,{"Sales Rep"})
Thank you, I got it. It is working. But is this a bug in the PQ? why I do not need to do the "Replace with NULL" step if I Get Data from Table? Thank you once again.
 
Upvote 0
Don't know if a bug or just the way things happen with .csv or .pdf files. I usually don't work with either unless it happens in a forum I am assisting. Glad you have it working.
 
Upvote 0
Thank you for your help. I appreciate it.
From a text / csv file, it's considered as an empty string, rather than a null. Not a bug, I don't think. You just need to remember that Fill only fills over nulls, so if you don't see null it ain't gonna fill.
 
Upvote 0

Forum statistics

Threads
1,223,702
Messages
6,173,959
Members
452,539
Latest member
delvey

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top