Hi guys,
I'm getting my csv data from a folder (7 files) but the entity column has lotta weird symbols. IT works well if i download 1 file or if i do it opening the content column but it does not work if i create a custom column with Csv.Document([Content]). I've add Encoding=65001 and still not working.....
Here's my code:
let
Source = Folder.Files("C:\Users\Pedro\xxxxx"),
#"Added Custom" = Table.AddColumn(Source, "Custom", each Csv.Document ([Content])), Encoding=65001,
#"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"Name", "Date created", "Custom"}),
#"Expanded {0}" = Table.ExpandTableColumn(#"Removed Other Columns", "Custom", {"Column1", "Column2", "Column3", "Column4", "Column5", "Column6", "Column7", "Column8", "Column9", "Column10", "Column11", "Column12", "Column13", "Column14", "Column15", "Column16", "Column17", "Column18", "Column19", "Column20", "Column21", "Column22", "Column23", "Column24", "Column25", "Column26", "Column27", "Column28", "Column29", "Column30"}, {"Column1", "Column2", "Column3", "Column4", "Column5", "Column6", "Column7", "Column8", "Column9", "Column10", "Column11", "Column12", "Column13", "Column14", "Column15", "Column16", "Column17", "Column18", "Column19", "Column20", "Column21", "Column22", "Column23", "Column24", "Column25", "Column26", "Column27", "Column28", "Column29", "Column30"})
in
#"Expanded {0}"
Anyone can help please?
Thank you all
Pedro
I have seen the following cause data to be missing or display incorrectly from the Original CSV file; not confident it will fix your issue but worth a try. Update the ".None" to ".Csv".
When you select the connector for CSV from Get Data it will append "QuoteStyle" with .Csv and NOT .None
FROM- #"Added Custom" = Table.AddColumn(Source, "Custom", each Csv.Document([Content],[Delimiter=",", Columns=30, Encoding=1252, QuoteStyle=QuoteStyle.None]))
TO - #"Added Custom" = Table.AddColumn(Source, "Custom", each Csv.Document([Content],[Delimiter=",", Columns=30, Encoding=1252, QuoteStyle=QuoteStyle.Csv]))
HI @Anonymous
You may try this code:
let
Source = Folder.Files("C:\Users\linli\Desktop\daily\2020\0122"),
#"Added Custom" = Table.AddColumn(Source, "Custom", each Csv.Document([Content],[Delimiter=",", Columns=30, Encoding=1252, QuoteStyle=QuoteStyle.None])),
#"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"Name", "Date created", "Custom"})
in
#"Removed Other Columns"
Regards,
Lin
I did....
let Source = Folder.Files("C:\Users\...\Purchases"), #"Removed Other Columns" = Table.SelectColumns(Source,{"Name", "Date created", "Content"}), #"Added Custom" = Table.AddColumn(#"Removed Other Columns", "Custom", each Csv.Document ([Content])),Delimiter=",", Columns=30, Encoding=1252, QuoteStyle=QuoteStyle.None, #"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Content"}), #"Expanded {0}" = Table.ExpandTableColumn(#"Removed Columns", "Custom", {"Column1", "Column2", "Column3", "Column4", ...
Still not working @v-lili6-msft
Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.
User | Count |
---|---|
460 | |
148 | |
121 | |
53 | |
53 |
User | Count |
---|---|
447 | |
129 | |
113 | |
78 | |
71 |