Forum Discussion
NAOS
7 years agoAdvocate III
power query expression.syntax error invalid identifier with parentheses
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([...
- Anonymous7 years ago
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
Rudz
5 years agoKudo Collector
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?"]
- Anonymous4 years agoNot applicable
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
Before:
if [(ref).v_cust_po_date] = null then [(ref).so_header_create_date] else [(ref).v_cust_po_date]),⚠️ Invalid identifier.--
After:
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.- apralou3 years agoAdvocate II
Thank God for you is all I can say.
- thomasfmeier1 year agoFrequent Visitor
Thank you for this. Had the same issue with a field [Total Price Ex Tax ($)] and your solution solved this 🙂
- KERZ4 years agoNew Member
worked like a charm