Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I'm needing to use Substitute to change "(" that's in part of a product description string in a list I have.
The problem I'm running into is that the ( is being recognized in DAX as part of the formula itself.
=Substitute([ProductList], "(", "A")
Syntax errors out saying that the DAX formula is missing the ) to close the formula.
Thoughts ?
@Anonymous
I did not encounter the error, please share a screenshot of the error:
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
What I was attempting to do, and where I thought the error was, was incorrect on my part.
OrderActivityNotes |
[2021-01-02 08:48:03] Alert Created: Low Inventory; [2021-01-02 08:49:29] Alert status set to New; [2021-01-02 10:05:05] Case Edited: Order Purchase (EMPLOYEEID); [2021-01-02 10:05:05] Alert Closed (EMPLOYEEID)
There's a string entry in my product list that we call Activity Notes. If there's low inventory on a particular product, a step entry is made in the Order Activity Notes column of my product list.
I'm attempting to extract the EMPLOYEEID from the string that appears between the "(" and ")".
I was using this formula in excel where I used to house the information prior to now having it in Power BI.
It seems that DAX doesn't translate the formula as it did in Excel.
= SUBSTITUTE(TRIM(RIGHT(SUBSTITUTE([OrderActivityNotes],"(",REPT(" ",LEN([OrderActivityNotes]))),LEN(([OrderActivityNotes]))),")",""))) Which ends up with this error: The syntax ")" is incorrect. And it points it to this part of the formula at the end: ,")",""))) Sorry for the added story, I really thought it had something to do with trying to find "(" and Dax "seeing" the ( as part of the formula as an open
|
SUPER NOOB MOVE...
I nested too many ) in the formula, and didn't check my work overall.
I figured it out.
Hope it works now?
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.