cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Cze-Jhin
Frequent Visitor

The syntax for ")" is incorrect in powerBI measures

Hi All,

I'm pretty new in the powerBI world, and am stuck with a syntax error, hope you can help me with it.

I would like to achieve the following formula = IFERROR((Grandtotal-Outcome A- Outcome B- Outcome C- Outcome D)/ Grandtotal, 0) via PowerBI. 

However, I keep receiving the "Syntax for ')' is incorrect" error, I have tried to remove some brackets or changed the type of brackets, but it still doesnt work. May I know how to fix the issue?

 

May refer to the following code sample I am using for DAX in PowerBI.

Test Rate 2 = 
DIVIDE(
    {CALCULATE({CALCULATE(COUNTROWS('Table1'), ALL('Table1'))
                -
                COUNTROWS('Table1'), 
                    FILTER(VALUES('Table1'[AttemptOutcomeName]), 'Table1'[AttemptOutcomeName] IN {"Outcome A"})
                -
                COUNTROWS('Table1'), 
                    FILTER(VALUES('Table1'[AttemptOutcomeName]), 'Table1'[AttemptOutcomeName] IN {"Outcome B"})
                -
                COUNTROWS('Table1'), 
                    FILTER(VALUES('Table1'[AttemptOutcomeName]), 'Table1'[AttemptOutcomeName] IN {"Outcome C"})
                -
                COUNTROWS('Table1'), 
                    FILTER(VALUES('Table1'[AttemptOutcomeName]), 'Table1'[AttemptOutcomeName] IN {"Outcome D"})})
,
    CALCULATE(COUNTROWS('Table1'), ALL('Table1'))
)

 Thank you, would really appreciate if you could help with it.

 

@PowerBI 

1 ACCEPTED SOLUTION
brianalva
Helper I
Helper I

The very start of the formula begins with curly brackets, try replacing them with round ones.

DIVIDE(
    (CALCULATE((CALCULATE(COUNTROWS('Table1'), ALL('Table1'))

View solution in original post

3 REPLIES 3
Cze-Jhin
Frequent Visitor

Thank you @brianalva 

brianalva
Helper I
Helper I

The very start of the formula begins with curly brackets, try replacing them with round ones.

DIVIDE(
    (CALCULATE((CALCULATE(COUNTROWS('Table1'), ALL('Table1'))

View solution in original post

All formulas in round brackets and text in curly brackets

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!