Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi all, I'm trying to reference a column in a query step as follows:
ModifySiteArea = Table.ReplaceValue(RenameColumns,each [Site Area (m2)], each if [UnitOfMeasurement] = "ft²" then Value.Divide([Site Area (m2)],10.764) else [Site Area (m2)],Replacer.ReplaceValue,{"Site Area (m2)"})
This causes the Expression.Syntax error. Invalid Indetifier to show up. If I rename the column "Site Area (m2)" to "Site Area" the query works with no problems. The double quotes on the column name don't solve the problem either. Could someone explain me why is this?
Solved! Go to Solution.
HI @NAOS,
Actually, current you can't use specific characters in [] operator. Maybe you can consider to change name before do this operation and restore fields name after finished replace operations.
Regards,
Xiaoxin Sheng
wow, this is critical, I had an unresolvable issue with the invalid syntax identifier present within [ID: Item Cat] and I had tried with putting ["ID: Item Cat"] or changing it to {ID: Item Cat} but that would mean that we don't consider the headers but values themselves and then after it worked when I replaced the syntax with just this [Item Cat]
I had a similar problem with a column with a question mark in the column name. Here's the syntax that worked there. I'm guessing it would work for yours too.
[#"Valid?"]
worked like a charm
Thanks @Rudz, this worked for me!
I was getting the error due to my column names beginning with "(ref)." and this saved me from having to add multiple unnecessary steps
if [(ref).v_cust_po_date] = null
then [(ref).so_header_create_date]
else [(ref).v_cust_po_date]),
⚠️ Invalid identifier.
if [#"(ref).v_cust_po_date"] = null
then [#"(ref).so_header_create_date"]
else [#"(ref).v_cust_po_date"]),
✔️ No syntax errors have been detected.
Thank God for you is all I can say.
HI @NAOS,
Actually, current you can't use specific characters in [] operator. Maybe you can consider to change name before do this operation and restore fields name after finished replace operations.
Regards,
Xiaoxin Sheng
Hi Xiaoxin,
That's what I ended up doing. Thanks for your answer!
User | Count |
---|---|
86 | |
83 | |
67 | |
61 | |
57 |
User | Count |
---|---|
138 | |
112 | |
94 | |
84 | |
70 |