This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
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!
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 26 | |
| 22 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 45 | |
| 44 | |
| 41 | |
| 21 | |
| 18 |