Forum Discussion
Failed to save data to Fields
Hi, everytime I try to save data from power query to Fields the following error encouters me. " A Task's exception weren't observed by the waiting on the task or accessing its exception property. As a result, the unobserved was rethrown by the finalizer thread. How can I fix it?
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.
8 Replies
- lbendlinSuper User
What is "Fields" ? Are you doing this in Excel, or in a Dataflow Gen 2, or somewhere else?
- Anonymous-New Member
Of Course, here is the screenshot
- Anonymous-New Member
First, Sorry for taking alot of time to reply. And I'm talking about Power BI.
And here is a screenshot for the error.
- ToddChittSuper User
First, have you tried searching on line for this particular error message? Second, it is apparent that there is some issue with the Power Query behind the scenes. What is your query source? ODBC? SQL? Something else? What applied steps do you have? Can you paste in the entire M script (Advanced Editor) if it's not too long? How many rows and columns are you expecting? If you step through the Applied Steps on the right, starting at the top, is there a point at which you get errors instead of data you are expecting?
- Anonymous-New Member
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"- ToddChittSuper User
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.