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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

token ')' expected error, but it makes no sense whatsoever to put a parenthesis there

I am going insane. I am trying to copy over a working calculation from one report to another, using the same data. And I cannot get the formula to work. I am creating a custom column and getting an error that says a parenthesis is expected in the middle of my string of text, please help me! See the formula in the attachment and the red squigly underline indicating the ridiculous spot I'm supposed to put ')'

 BI 1.JPG

1 ACCEPTED SOLUTION
blopez11
Super User
Super User

That is a DAX formula that you are trying to use in the Query Editor, which uses the M language.  In the report view, go to the Data pane, right click on the table you wish to add that calculation, and select "New column".  Hopefully that will work for you.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Thank you it worked perfectly that way. 

Ahmedx
Super User
Super User

pls try this

if [Impact Date] > Date.From( DateTime.LocalNow()) +60 then "ID > 60 Days" 
else if  [Impact Date]  > Date.From( DateTime.LocalNow()) then "lD < 60 Days" 
else if [lmpact Date] = "" then "No Date Provided" else if[Impact Date] <= Date.From( DateTime.LocalNow()) then
"Expired" else null 
Ahmedx
Super User
Super User

what you write is the syntax DAX,
and you need a code in M language

blopez11
Super User
Super User

That is a DAX formula that you are trying to use in the Query Editor, which uses the M language.  In the report view, go to the Data pane, right click on the table you wish to add that calculation, and select "New column".  Hopefully that will work for you.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors