Forum Discussion
Failed to save data to Fields
- 2 years ago
CSV as a source should be a piece of cake for Power Query to ingest. Is is possible that Excel is doing something to the data? Try openning the CSV file in a text editor program like Notepad or Notepad ++. Do you see any strange characters?
IMHO I try to avoid letting Excel touch raw CSV and TXT files between the export from the source system and ingestion by Power BI. I have seen it royally mess things up, especially Zip Codes, which it looks like you have.
Lastly, try the same file on your local C:\ drive. Maybe there are restrictions on your D drive.
Hope that helps.
First, Thank you for helping me. Second, My query source is Excel. and yes I definitely searched for this exact error alot but I just couldn't find anything related to it. As for rows and columns they are not that much nearly 600 rows and 4 columns
And here is the M script.
let
Source = Csv.Document(File.Contents("D:\19\banklist.csv"),[Delimiter=",", Columns=7, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Bank Name ", type text}, {"City ", type text}, {"State ", type text}, {"Cert ", Int64.Type}, {"Acquiring Institution ", type text}, {"Closing Date ", type date}, {"Fund", Int64.Type}}),
#"Removed Other Columns" = Table.SelectColumns(#"Changed Type",{"Bank Name ", "City ", "State ", "Closing Date "}),
#"Inserted Merged Column" = Table.AddColumn(#"Removed Other Columns", "City, State", each Text.Combine({[#"City "], ", ", [#"State "]}), type text)
in
#"Inserted Merged Column"
CSV as a source should be a piece of cake for Power Query to ingest. Is is possible that Excel is doing something to the data? Try openning the CSV file in a text editor program like Notepad or Notepad ++. Do you see any strange characters?
IMHO I try to avoid letting Excel touch raw CSV and TXT files between the export from the source system and ingestion by Power BI. I have seen it royally mess things up, especially Zip Codes, which it looks like you have.
Lastly, try the same file on your local C:\ drive. Maybe there are restrictions on your D drive.
Hope that helps.
- Anonymous-2 years agoNew Member
Thanks so much. I appretiate it
I will try and see where the problem comes from.