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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Redraidas1
Helper I
Helper I

Need help with DAX - Incorrect syntax

I have a very simple DAX snippet, however, for some reason Power BI throws an error saying:

'The syntax for ')' is incorrect.  


I can't figure out what's wrong?

count =
CALCULATE (
    DISTINCTCOUNT ( DimFranchiseMarket[FranchiseMarketName] ),
    FILTER (
        DimFranchiseMarket,
        SUMX (
            RELATEDTABLE ( GroupValuesOutput ),
            GroupValuesOutput[GroupValue] <> BLANK
        )
    )
)

2 ACCEPTED SOLUTIONS
littlemojopuppy
Community Champion
Community Champion

The problem is with the SUMX statement.  Try this.

 

count =
CALCULATE (
	DISTINCTCOUNT ( DimFranchiseMarket[FranchiseMarketName] ),
	FILTER (
		DimFranchiseMarket,
		SUMX (
			RELATEDTABLE ( GroupValuesOutput ),
			GroupValuesOutput[GroupValue]
		) <> BLANK
	)
)

 

 

View solution in original post

Anonymous
Not applicable

Hi @Redraidas1 ,

First, you can use DAX Formatter tool to format and validate your formula of measure. It will be more simple to find the problem. If it is OK after validate in the tool, then check the formula base on the actual requirement again. Anyway, @littlemojopuppy has already provided you the correct formula...

count =
CALCULATE (
    DISTINCTCOUNT ( DimFranchiseMarket[FranchiseMarketName] ),
    FILTER (
        DimFranchiseMarket,
        SUMX ( RELATEDTABLE ( GroupValuesOutput ), GroupValuesOutput[GroupValue] ) <> BLANK
    )
)

Best Regards

View solution in original post

4 REPLIES 4
ReznorTonya
Frequent Visitor

I too am struggling find an issue with a syntax error with Dax I've exhausted myself trying to figure it out 😞 ideas anyone???

 

 

ReadinessRating = VAR col1 = SUM(Readiness[Flag_StaffHired]) VAR col2 = SUM(Readiness[Flag_Hired and Deployable step 2]) VAR col3 = SUM(Readiness[Flag_Provider]) Var Col1_Stat = SWITCH( TRUE(), col1 >= 16, "S1", col1 >= 12, "S2", col1 >= 10, "S3", "S4") Var Col2_Stat = SWITCH( TRUE(), col2 >= 16, "S1", col2 >= 12, "S2", col2 >= 10, "S3", "S4") Var Col3_Stat = SWITCH( TRUE(), col3 >= 4, "S1", col3 = 3, "S2", col3 = 2, "S3", "S4") Return SWITCH( TRUE(), Col1_Stat = "S4" || Col2_Stat = "S4" || Col3_Stat = "S4", "S4", Col1_Stat = "S3" || Col2_Stat = "S3" || Col3_Stat = "S3", "S3", Col1_Stat = "S2" || Col2_Stat = "S2" || Col3_Stat = "S2", "S2", "S1")

Anonymous
Not applicable

Hi @ReznorTonya ,

You can open a new case for your problem in the community, and you will get a dedicated support. For your problem, you can use DAX Formatter tool to format your formula first. It will be easier to find the error. Please update the formula of [] as below and check if it can get your expected result. If no, you can raise a new case with the formula and the function which you want to achieve by this formula.

ReadinessRating =
VAR col1 =
    SUM ( Readiness[Flag_StaffHired] )
VAR col2 =
    SUM ( Readiness[Flag_Hired and Deployable step 2] )
VAR col3 =
    SUM ( Readiness[Flag_Provider] )
RETURN
    SWITCH (
        TRUE (),
        col1 >= 16
            || col2 >= 16
            || col3 >= 4, "S1",
        col1 >= 12
            || col2 >= 12
            || col3 = 3, "S2",
        col1 >= 10
            || col2 >= 10
            || col3 = 2, "S3",
        "S4"
    )

Best Regards

Anonymous
Not applicable

Hi @Redraidas1 ,

First, you can use DAX Formatter tool to format and validate your formula of measure. It will be more simple to find the problem. If it is OK after validate in the tool, then check the formula base on the actual requirement again. Anyway, @littlemojopuppy has already provided you the correct formula...

count =
CALCULATE (
    DISTINCTCOUNT ( DimFranchiseMarket[FranchiseMarketName] ),
    FILTER (
        DimFranchiseMarket,
        SUMX ( RELATEDTABLE ( GroupValuesOutput ), GroupValuesOutput[GroupValue] ) <> BLANK
    )
)

Best Regards

littlemojopuppy
Community Champion
Community Champion

The problem is with the SUMX statement.  Try this.

 

count =
CALCULATE (
	DISTINCTCOUNT ( DimFranchiseMarket[FranchiseMarketName] ),
	FILTER (
		DimFranchiseMarket,
		SUMX (
			RELATEDTABLE ( GroupValuesOutput ),
			GroupValuesOutput[GroupValue]
		) <> BLANK
	)
)

 

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.