Forum Discussion
Redraidas1
5 years agoHelper 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 ( DIS...
- 5 years ago
The problem is with the SUMX statement. Try this.
count = CALCULATE ( DISTINCTCOUNT ( DimFranchiseMarket[FranchiseMarketName] ), FILTER ( DimFranchiseMarket, SUMX ( RELATEDTABLE ( GroupValuesOutput ), GroupValuesOutput[GroupValue] ) <> BLANK ) ) - Anonymous5 years ago
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
5 years agoCommunity Champion
The problem is with the SUMX statement. Try this.
count =
CALCULATE (
DISTINCTCOUNT ( DimFranchiseMarket[FranchiseMarketName] ),
FILTER (
DimFranchiseMarket,
SUMX (
RELATEDTABLE ( GroupValuesOutput ),
GroupValuesOutput[GroupValue]
) <> BLANK
)
)