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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors