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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Jayadev
Helper I
Helper I

Summarising values from two tables

 

Hi,

 

I have two tables where in Bills are stored in one table & payments are in another table, need to create a new table with following information.    Both tables are in data model, I need to know the DAX formula to generate the output table.

 

 

Summarize.PNG

 

Thanks in Advance.

Regards,

Jay

 

2 ACCEPTED SOLUTIONS

Hi @Jayadev,

 

Based on my test, the formula(DAX) below should work in your scenario. Smiley Happy

Table = 
SUMMARIZE (
    Table1,
    Table1[Bill Date],
    Table1[Key],
    "Amount", SUM ( Table1[Amount] ),
    "Received", SUM ( Table2[Received] ),
    "Remaining", SUM ( Table1[Amount] ) - SUM ( Table2[Received] )
)

t1.PNG

 

Regards

View solution in original post

Hi @Jayadev,

 

Great to help! Could you accept my reply above as solution to close this thread? Smiley Happy

 

Regards

View solution in original post

5 REPLIES 5
mattbrice
Solution Sage
Solution Sage

What is "Key"?   I assume that is an invoice number?  And did you intend for the 'Key' & 'Customer' in the second line of the required output to be 'M020' & 'Abc' respectively?   Is there a relationship between the two tables?  Or is there a bridge table in between - like  a 'Key' header table?

 

 

 

Thanks for the attention.

You are right, Key is, Invoice Number, there is relationship, table A will have multiple rows, Table B one record for each invoice number.  

 

Yes required output to be M010, M020 respectively.  I made mistake in my example, you pointed out rightly

Thanks once again for attention, please help me to apply the DAX.

 

Regards,

Jay

 

 

 

 

 

Hi @Jayadev,

 

Based on my test, the formula(DAX) below should work in your scenario. Smiley Happy

Table = 
SUMMARIZE (
    Table1,
    Table1[Bill Date],
    Table1[Key],
    "Amount", SUM ( Table1[Amount] ),
    "Received", SUM ( Table2[Received] ),
    "Remaining", SUM ( Table1[Amount] ) - SUM ( Table2[Received] )
)

t1.PNG

 

Regards

Thanks a lot, it works fine.

Hi @Jayadev,

 

Great to help! Could you accept my reply above as solution to close this thread? Smiley Happy

 

Regards

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.