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
Velocity
Helper III
Helper III

No se puede crear una columna basada en la relación con otra tabla

Hola

Tengo una tabla (Table_A) con varios valores de un campo (Field_A). Hay otra tabla (Distinct_Table_B) con un solo campo (Field_B). Hay una relación de una a muchas construida de Field_B a Field_A.

Quiero crear una columna calculada en Table_A que diga "Verdadero" si encuentra Field_B coincidentes para Field_A.

Ayuda solicitada.

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Velocity

Nueva columna en Table_A

Nueva columna: if(isblank(countx(filter(Distinct_Table_B,Distinct_Table_B[Field_B]- Table_A[Field_A] ), Distinct_Table_B[Field_B])),"No","Sí")

View solution in original post

Ashish_Mathur
Super User
Super User

Hola

En Table_A, cree esta fórmula de columna calculada

•IF(ISBLANK(RELATED(Distinct_Table_B [Field_B])),FALSE(),TRUE())Distinct_Table_B

Espero que esto ayude.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
Ashish_Mathur
Super User
Super User

Hola

En Table_A, cree esta fórmula de columna calculada

•IF(ISBLANK(RELATED(Distinct_Table_B [Field_B])),FALSE(),TRUE())Distinct_Table_B

Espero que esto ayude.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Gracias @Ashish_Mathur

De nada.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@Velocity

Nueva columna en Table_A

Nueva columna: if(isblank(countx(filter(Distinct_Table_B,Distinct_Table_B[Field_B]- Table_A[Field_A] ), Distinct_Table_B[Field_B])),"No","Sí")

Gracias @amitchandak. Sin embargo, no he entendido el papel de countx en esta expresión. ¿Puede explicarlo, por favor?

Estoy creando una columna de cálculo para obtener datos de tablas no relacionadas mediante la elección de filtros. Así que acabo de contar si está presente en otra tabla. Volverá en blanco para que no coincida. También podemos usar minx y maxx.

** no relacionado - la forma en que lo estamos utilizando a partir de ahora.

@amitchandak

... pero ya que las tablas están relacionadas(Hay una relación de una a muchas construida de Field_B a Field_A), ¿hay una mejor manera de manejarlo? Cuando hay millones de registros en Table_A, llevará mucho tiempo.

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.