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
Anonymous
Not applicable

Usar USERELATIONSHIP varias veces dentro de la misma medida

Hola

Tengo una tabla con varias columnas de fechas, y necesito crear una tabla con recuentos de ellas.

Los básicos, que son de la forma CALCULATE( COUNTA( Table[Column] ), USERELATIONSHIP( Calendar[Date], Table[Date_Col] ) ya sé cómo obtener.

Lo que me gustaría saber es si puedo usar USERELATIONSHIP varias veces en la misma medida, y especificar a qué parte de la medida debe aplicarse esa relación. Algo como esto:

Medida: CALCULATE( COUNTA( Tabla[Columna1] ),

FILTER( Tabla, Tabla[Date_1] <> BLANK() ) && USERELATIONSHIP( Calendario[Fecha], Tabla[Date_1] ),

FILTER( Tabla, Tabla[Date_2] - BLANK() ) && USERELATIONSHIP( Calendario[Fecha], Tabla[Date_2] )

)

Gracias de antemano!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@martifapa , No para el mismo conjunto de tabla .

Pero puedes intentarlo como

Measure = CALCULATE( COUNTA( Table[Column1] ),
	FILTER( Table, Table[Date_1] <> BLANK() ) , USERELATIONSHIP( Calendar[Date], Table[Date_1] ))
) 
+ 
CALCULATE( COUNTA( Table[Column1] ),  FILTER( Table, Table[Date_2] = BLANK() ), USERELATIONSHIP( Calendar[Date], Table[Date_2] ))  

View solution in original post

2 REPLIES 2
v-diye-msft
Community Support
Community Support

Hola @martifapa

Si la ayuda de las publicaciones anteriores, por favor márquela como una respuesta para ayudar a otros a encontrarla más rápidamente. ¡Gracias!

Si no, por favor, amablemente elaborar más.

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

@martifapa , No para el mismo conjunto de tabla .

Pero puedes intentarlo como

Measure = CALCULATE( COUNTA( Table[Column1] ),
	FILTER( Table, Table[Date_1] <> BLANK() ) , USERELATIONSHIP( Calendar[Date], Table[Date_1] ))
) 
+ 
CALCULATE( COUNTA( Table[Column1] ),  FILTER( Table, Table[Date_2] = BLANK() ), USERELATIONSHIP( Calendar[Date], Table[Date_2] ))  

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.