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
Bublic
New Member

Agregar columna basada en el valor de otras columnas de tabla

¡Hola!

Necesita su ayuda con la tarea simple..

Tengo 2 tablas sin relaciones entre ellas:

#Table1('ColumnA', 'ColumnB'', ''1,Green Apple', '2,Red Potato','3,Blue Star','4,Kung Fu Panda')

#Table2('ColumnC', 'ColumnD','''manzana', fruta', 'patata,','estrella', objeto astronómico', 'kung fu', arte marcial')

El objetivo es agregar ColumnE a Table1 con esta condición:

si Text.Contains(Table1[ColumnB, Table2[ColumnC]) y luego Table2[ColumnD] else null

El resultado debe ser:

#Table1('ColumnA', "Columnb","ColumnE"', '1,Green Apple , fruit', '2,Red Potato, vegetable', '3,Blue Star, astronomical object', '4,Kung Fu Panda, martial art')

Esto funciona perfectamente con bloques estáticos manuales si, pero no tengo idea de cómo automatizar esta tarea utilizando valores de la tabla.

¿Alguna idea?

1 ACCEPTED SOLUTION
Bublic
New Member
6 REPLIES 6
Bublic
New Member

Pragati11
Super User
Super User

Hola @Bublic ,

Intente dividir su "Columna B" en espacios. Así que usted enviará con somwhting como este:

Columna B.1 Columna B.2

Manzana Verde

Patata roja.....

Ahora cree una relación entre ambas tablas mediante la columna B.2 de la 1a tabla y la columna C de la 2a tabla.

Gracias

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

La columna B puede contener un valor como: "La manzana verde más grande en todo el mundo". ¿Cómo puedo adivinar qué columna dividida usar?

Hola @Bublic ,

En ese caso, compartió los datos de ejemplo incorrectos con el problema.

Ir con la opción sugerida por @Greg_Deckler .

Gracias

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Greg_Deckler
Super User
Super User

@Bublic

@ImkeF @edhans

En DAX, esto sería LOOKUPVALUE o MAXX(FILTER(...) ...)


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

En mi casov LOOKUPVALUE no funciona sin relación(

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.