Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi everyone,
I have a syntax error on this code line and I've looked at it many times but I fail to see what is wrong.
Can someone please help?
let
source=Csv.Document(File.Contents("c:\temp\01-January.csv"), [Delimiter=",", Columns=12, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers"=Table.PromoteHeaders (Source, [PromoteAllScalars=true]),
#"Replaced Value" =Table.ReplaceValue(#"Promoted Headers”, "", null, Replacer.ReplaceValue, {"Month"})
in
Source
The error says "Token comma expected" and it points to the {"Month"} as shown in picture
Solved! Go to Solution.
@phillip_from_oz , when you have used #"Promoted Headers" , check that double quotes are different on both side. correct it once and try. Check example below
let
source=Csv.Document(File.Contents("c:\temp\01-January.csv"), [Delimiter=",", Columns=12, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers"=Table.PromoteHeaders (Source, [PromoteAllScalars=true]),
#"Replaced Value" =Table.ReplaceValue(#"Promoted Headers", "", null, Replacer.ReplaceValue, {"Month"})
in
Source
@phillip_from_oz , when you have used #"Promoted Headers" , check that double quotes are different on both side. correct it once and try. Check example below
let
source=Csv.Document(File.Contents("c:\temp\01-January.csv"), [Delimiter=",", Columns=12, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers"=Table.PromoteHeaders (Source, [PromoteAllScalars=true]),
#"Replaced Value" =Table.ReplaceValue(#"Promoted Headers", "", null, Replacer.ReplaceValue, {"Month"})
in
Source
Thanks.
I must have stared at that code for hours!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |