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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
EstanisMiret
Frequent Visitor

Conectores multiples

Dispongo de dos tablas de datos, una de movimientos y otra de clientes/socios

En la tabla de movimientos aparecen los campos "fecha", "cliente", "socio", "producto" e "importe". 

En la tabla de clientes/socios tengo los campos "nombre"

Tego las tablas de datos vinculadas por "cliente" = "nombre"

 

El problema es que mis socios también pueeden ser clientes, y quiero calcular la suma de importes de cada "nombre" como "cliente" y como "colaborador".

 

¿Hay algun criterio que permita que los conectores entre tablas sean condicionales y que pueda elegir como debe de agrupar los datos? 

2 ACCEPTED SOLUTIONS
GeraldGEmerick
Super User
Super User

@EstanisMiret You can form multiple relationships between tables and use the USERELATIONSHIP function within the CALCULATE function to control which relationship is used. So you could create two relationships between the tables like name to customer and name to partner and depending on which one you want to use then you could control the behavior. 

View solution in original post

wardy912
Super User
Super User

Hi @EstanisMiret 

 

 Configure 2 relationships between the tables, 1 active and 1 inactive:

Active - Company[Name] - Transactions[Client]

Inactive - Company[Name] - Transactions[Partner]

 

wardy912_0-1765895901960.png

 

Add 2 measures to your report:

 

Client transaction total = SUM(Transactions[Amount])

 

Partner transaction total = CALCULATE(SUM(Transactions[Amount]),
                            USERELATIONSHIP(Company[Name], Transactions[Partner]))

 

You will get the following results:

 

wardy912_1-1765896154393.png

 

 

--------------------------------

I hope this helps, please give kudos and mark as solved if it does!

 

Connect with me on LinkedIn.

Subscribe to my YouTube channel for Fabric/Power Platform related content!

View solution in original post

4 REPLIES 4
wardy912
Super User
Super User

Hi @EstanisMiret 

 

 Configure 2 relationships between the tables, 1 active and 1 inactive:

Active - Company[Name] - Transactions[Client]

Inactive - Company[Name] - Transactions[Partner]

 

wardy912_0-1765895901960.png

 

Add 2 measures to your report:

 

Client transaction total = SUM(Transactions[Amount])

 

Partner transaction total = CALCULATE(SUM(Transactions[Amount]),
                            USERELATIONSHIP(Company[Name], Transactions[Partner]))

 

You will get the following results:

 

wardy912_1-1765896154393.png

 

 

--------------------------------

I hope this helps, please give kudos and mark as solved if it does!

 

Connect with me on LinkedIn.

Subscribe to my YouTube channel for Fabric/Power Platform related content!

It works perfectly! 

 

Thanks for the explanation

GeraldGEmerick
Super User
Super User

@EstanisMiret You can form multiple relationships between tables and use the USERELATIONSHIP function within the CALCULATE function to control which relationship is used. So you could create two relationships between the tables like name to customer and name to partner and depending on which one you want to use then you could control the behavior. 

Thanks for the solution, it works as needed! 😉

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.