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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
hreutte
Frequent Visitor

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
Resident Rockstar
Resident Rockstar

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
hreutte
Frequent Visitor

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
Resident Rockstar
Resident Rockstar

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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