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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Redraidas1
Helper I
Helper I

Necesita ayuda con DAX - Sintaxis incorrecta

Tengo un fragmento de DAX muy simple, sin embargo, por alguna razón Power BI produce un error que dice:

'La sintaxis de ')' es incorrecta.


¿No puedo entender qué pasa?

contar ?
CALCULAR (
DISTINCTCOUNT ( DimFranchiseMarket[FranchiseMarketName] ),
FILTRO (
DimFranchiseMarket,
SUMX (
RELATEDTABLE ( GroupValuesOutput ),
GroupValuesOutput[GroupValue] <> BLANK
)
)
)

2 ACCEPTED SOLUTIONS
littlemojopuppy
Community Champion
Community Champion

El problema es con la instrucción SUMX. Prueba esto.

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

View solution in original post

v-yiruan-msft
Community Support
Community Support

No @Redraidas1 ,

En primer lugar, puede utilizar la herramienta DAX Formatter para dar formato y validar la fórmula de medida. Será más sencillo encontrar el problema. Si está bien después de validar en la herramienta, compruebe la base de la fórmula en el requisito real de nuevo. De todos modos, @littlemojopuppy ya te ha proporcionado la fórmula correcta...

contar ?
Calcular (
DISTINCTCOUNT ( DimFranchiseMarket[FranchiseMarketName] ),
Filtro (
DimFranchiseMarket,
SUMX ( RELATEDTABLE ( GroupValuesOutput ), GroupValuesOutput[GroupValue] ) <> BLANK
)
)

Saludos

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

No @Redraidas1 ,

En primer lugar, puede utilizar la herramienta DAX Formatter para dar formato y validar la fórmula de medida. Será más sencillo encontrar el problema. Si está bien después de validar en la herramienta, compruebe la base de la fórmula en el requisito real de nuevo. De todos modos, @littlemojopuppy ya te ha proporcionado la fórmula correcta...

contar ?
Calcular (
DISTINCTCOUNT ( DimFranchiseMarket[FranchiseMarketName] ),
Filtro (
DimFranchiseMarket,
SUMX ( RELATEDTABLE ( GroupValuesOutput ), GroupValuesOutput[GroupValue] ) <> BLANK
)
)

Saludos

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
littlemojopuppy
Community Champion
Community Champion

El problema es con la instrucción SUMX. Prueba esto.

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

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.