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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Memorable Member
Memorable Member

@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
Memorable Member
Memorable Member

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
Memorable Member
Memorable Member

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
Memorable Member
Memorable Member

@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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.