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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
marcoslopez
Helper I
Helper I

Sum measure from several related tables

Hi community, I need to create a measure that summarizes several fields from different tables. The issue here is that I must summarize several measures and, here the problem, a value.

My structures

Table Clients
c.ClientID
c.ClientTaxID  ([EN] Unique Tax Identification Code,  [ES] Clave Única de Identificación Tributaria)
c.CreditLimit   (Here i have 1 credit limit by client)

Table Checks     (Several checks by client)
ch.ClientId
ch.OperationID
ch.Total

Table CustomerDebt    (Several movements by client)
cd.ClientID
cd.OperationID
cd.Total

Table Orders     (Several orders by client)
o.ClientID
o.OrderID
o.Total


What i need to sum is, per client, sth like:
Resume = c.CreditLimit - sum(ch.Total) - sum(cd.Total) - sum(o.Total)

How might I be able to obtain that formula?


Best Regards,
Marcos

2 ACCEPTED SOLUTIONS
edhans
Community Champion
Community Champion

Unless I am not understanding your problem this will just work once you create the relationshipes between the tables to a DIM table that has your client info. Create a SUM() measure for each type of data (checks, orders, etc) then one more measure that just adds/subtracts the measures.

 

When you put your client ID from the FACT table in a Table or Pivot visual, then the master measure that has your "resume" math, the row context of the pivot will make it work.

 

If I am totally missing your issue, please post a PBIX file with some sample data in it so we can see what is really going on.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

@edhans thanks, that helps.

That I've done is to create measures in respective fact tables and call them from dim Client.

Measure_TotalChecks = sum(ch.total)
Measure_TotalDebt = sum(cd.total)
Measure_TotalOrders = sum(o.total)

In Client table i calculate as column the totals what i needed

ClientRisk = c.CreditLimit - Measure_TotalChecks - Measure_TotalDebt - Measure_TotalOrders 


Best Regards, Marcos

View solution in original post

3 REPLIES 3
marcoslopez
Helper I
Helper I

Hi community, I need to create a measure that summarizes several fields from different tables. The issue here is that I must summarize several measures and, here the problem, a value.

My structures

Table Clients
c.ClientID
c.ClientTaxID  ([EN] Unique Tax Identification Code,  [ES] Clave Única de Identificación Tributaria)
c.CreditLimit   (Here i have 1 credit limit by client)

Table Checks     (Several checks by client)
ch.ClientId
ch.OperationID
ch.Total

Table CustomerDebt    (Several movements by client)
cd.ClientID
cd.OperationID
cd.Total

Table Orders     (Several orders by client)
o.ClientID
o.OrderID
o.Total


What i need to sum is, per client, sth like:
Resume = c.CreditLimit - sum(ch.Total) - sum(cd.Total) - sum(o.Total)

How might I be able to obtain that formula?


Best Regards,
Marcos

edhans
Community Champion
Community Champion

Unless I am not understanding your problem this will just work once you create the relationshipes between the tables to a DIM table that has your client info. Create a SUM() measure for each type of data (checks, orders, etc) then one more measure that just adds/subtracts the measures.

 

When you put your client ID from the FACT table in a Table or Pivot visual, then the master measure that has your "resume" math, the row context of the pivot will make it work.

 

If I am totally missing your issue, please post a PBIX file with some sample data in it so we can see what is really going on.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

@edhans thanks, that helps.

That I've done is to create measures in respective fact tables and call them from dim Client.

Measure_TotalChecks = sum(ch.total)
Measure_TotalDebt = sum(cd.total)
Measure_TotalOrders = sum(o.total)

In Client table i calculate as column the totals what i needed

ClientRisk = c.CreditLimit - Measure_TotalChecks - Measure_TotalDebt - Measure_TotalOrders 


Best Regards, Marcos

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.