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
ANM_97
Helper IV
Helper IV

Buscar un valor en una tabla y asociarlo

Hola

¿Cómo puedo crear una medida que busque el valor límite en la tabla 2 y la asigne a cada país de la tabla 1.

TABLA 1 TABLA 2

Country1 VALOR País2 LIMITE

X 500 A 1000

Y 100 X 550

Z 300 Y 300

B 5000

Gracias?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ANM_97

Crear una nueva columna en la tabla 1

New column = maxx(filter(table2, table2, table2[Country2] = table1[Country1]),table2[Limit])

View solution in original post

6 REPLIES 6
ANM_97
Helper IV
Helper IV

¡Funciona!

¡¡Gracias!! ~

amitchandak
Super User
Super User

@ANM_97

Crear una nueva columna en la tabla 1

New column = maxx(filter(table2, table2, table2[Country2] = table1[Country1]),table2[Limit])

¡Gracias por las respuestas!
Necesito construir una medida, no una nueva columna.

az38
Community Champion
Community Champion

@ANM_97

la forma más fácil es crear relaciones entre dos tablas por campos [País]. Creo que serán incluso relaciones uno a uno

Si todavía necesita un DAX, puede crear una columna LOOKUPVALUE() como

Column = 
LOOKUPVALUE(Table2[LIMIT], Table2[Country2], Table1[Country1])

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

¿Cómo puedo convertir esto en una masure?

Gracias?

az38
Community Champion
Community Champion

@ANM_97

simplemente interesante. ¿por qué necesita una medida, no columna?

tratar de una medida

Measure = 
CALCULATE(FIRSTNONBLANK(Table2[LIMIT],1), FILTER(ALL(Table2),Table2[Country2]=SELECTEDVALUE(Table1[Country1]))
)


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

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.