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

Cómo comparar el valor en dos tablas

Hola

:

He hecho dos tablas resumidas. Llamémoslos, Tabla1 y Tabla2.

En la tabla2, me gustaría añadir 4 nuevos colums.

El propósito de los nuevos colums es comparar fila por fila los siguientes campos: OpportunityID, Amount1, Amount2, Amount3

Por lo tanto, en la primera columna nueva, me gustaría comprobar si opportunityID en table1 - opportunityid en la tabla 2, si es así, sí de lo contrario no.

Para la segunda columna, me gustaría comprobar si la cantidad1 en la tabla 1 es la cantidad1 de la tabla2, si es así, sí, de lo contrario no. Lo mismo para column3 (comparar cantidad2) y column4 (comparar cantidad3).

¿Alguien sabe cómo hacer eso?

saludos

1 ACCEPTED SOLUTION
v-deddai1-msft
Community Support
Community Support

Hola @alepage ,

Por favor, intente utilizar la siguiente medida:

Measure =

IF (

    MAX ( Table1[Amount1] )

        = LOOKUPVALUE (

            Table2[Amount1],

            Table2[opportunityID], MIN ( Table1[opportunityID] )

        )

        && MAX ( Table1[Amount2] )

            = LOOKUPVALUE (

                Table2[Amount2],

                Table2[opportunityID], MIN ( Table1[opportunityID] )

            )

        && MAX ( Table1[Amount3] )

            = LOOKUPVALUE (

                Table2[Amount3],

                Table2[opportunityID], MIN ( Table1[opportunityID] )

            ),

    "yes",

    "no"

)

Saludos

Dedmon Dai

View solution in original post

1 REPLY 1
v-deddai1-msft
Community Support
Community Support

Hola @alepage ,

Por favor, intente utilizar la siguiente medida:

Measure =

IF (

    MAX ( Table1[Amount1] )

        = LOOKUPVALUE (

            Table2[Amount1],

            Table2[opportunityID], MIN ( Table1[opportunityID] )

        )

        && MAX ( Table1[Amount2] )

            = LOOKUPVALUE (

                Table2[Amount2],

                Table2[opportunityID], MIN ( Table1[opportunityID] )

            )

        && MAX ( Table1[Amount3] )

            = LOOKUPVALUE (

                Table2[Amount3],

                Table2[opportunityID], MIN ( Table1[opportunityID] )

            ),

    "yes",

    "no"

)

Saludos

Dedmon Dai

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.