Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors