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

uno a muchos registros de recuento de relaciones que no están en la segunda tabla

Hola expertos de la comunidad, tengo dos tablas, T1 y T2 con una relación uno a muchos. Algo así

Tabla 1

IdAtributo
10.5
21
31
40.8
50.8

Tabla 2

IdCampo2
1
1
1
3
3
5
5

Ahora, mi relación se basa en el campo ID. También tengo una medida que suma el Atributo en el Cuadro 1.

¿Cómo puedo usar esta medida diciendo algo como: Calculate(sum(Table1[Attribute]); Table2[ID] - blank()) que no funciona.

Me gustaría calcular esas medidas, para ver cuánto sería la suma para los registros que no tienen ningún corresponsal en el Cuadro 2.

¿Alguna idea?

2 ACCEPTED SOLUTIONS
v-shex-msft
Community Support
Community Support

Hola @emanuele ,

Puede utilizar la función expect para comparar y extraer registros inexistentes de dos tablas:

Medidas ?
VAR _list ?
    EXCEPTO ( VALORES ( Table1[ID] ), VALORES ( Table2[ID] ) )
devolución
    CALCULAR (
        SUM ( Tabla[Atributo] ),
        FILTRO ( ALLSELECTED ( Tabla1 ), [ID] EN _list )
    )

saludos

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

Anonymous
Not applicable

¡Gracias, ayuda!

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hola @emanuele ,

Puede utilizar la función expect para comparar y extraer registros inexistentes de dos tablas:

Medidas ?
VAR _list ?
    EXCEPTO ( VALORES ( Table1[ID] ), VALORES ( Table2[ID] ) )
devolución
    CALCULAR (
        SUM ( Tabla[Atributo] ),
        FILTRO ( ALLSELECTED ( Tabla1 ), [ID] EN _list )
    )

saludos

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

¡Gracias, ayuda!

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.