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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.