Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
username100
New Member

Error in PQ - Expression.SyntaxError: Token ')' expected

hi everyone , new to PQ in powerBI , i keep on getting this error , Expression.SyntaxError: Token ')' expected

 

this is my custom column - = Table.TransformColumns(#"Grouped Rows",("First Transaction Month",Date.StartOfMonth,Date.Type)

 

would appreciate any insights on this, as I am stuck here, I am doing a sample customer cohort & retention analysis 

3 REPLIES 3
Omid_Motamedise
Resident Rockstar
Resident Rockstar

Hi, it is all about the second argument, you should provide it in a list. IF you are going to transform values on a column, you just need to use one List sign, but to change the values on more than a column, you have to provided a list including one sub list for each column, so revise your formula to=>


Transform a column = Table.TransformColumns(#"Grouped Rows",{"First Transaction Month",Date.StartOfMonth,Date.Type})


Transform two column= Table.TransformColumns(#"Grouped Rows",{{"First Transaction Month",Date.StartOfMonth,Date.Type},{"Name column 2}, each _+1})

ZhangKun
Resolver V
Resolver V

Table.TransformColumns(#"Grouped Rows",{"First Transaction Month", Date.StartOfMonth,Date.Type})

or 

Table.TransformColumns(#"Grouped Rows",{{"First Transaction Month", Date.StartOfMonth,Date.Type}})

 

For a single conversion, you can use either {} or {{}}

watkinnc
Super User
Super User

Try

 

able.TransformColumns(#"Grouped Rows",{{"First Transaction Month",Date.StartOfMonth, type date}})

 

--Nate


I’m usually answering from my phone, which means the results are visualized only in my mind. You’ll need to use my answer to know that it works—but it will work!!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Kudoed Authors