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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
VictorV
Helper I
Helper I

Create Matrix table, with data from multiple table

Hi everyone, I have Table 1 and Table2 like the picture.

I want create new table, using matrix table for showing transaction from the bank in Table1. Each invoice No. will match with that transaction.

There are two thing will alway happen:

 

First: the total Amount of Invoice No in Table 2 will alway be the same with Table1[Debit]. For example, if Table1[Date] 1/22/2024 have Debit is 30000, then the Invoice will be 661 and 662 because these two sum will be 30000.

 

Second: The Table1[Date] will alway after the Table2[Date]. Because the transaction from the bank will alway happen after the Date in Table2

VictorV_0-1713261022712.png

 

Please help me!!!!!!

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @VictorV ,

 

I made simple samples and you can check the results below:

vtianyichmsft_2-1713338004528.png

Total = CALCULATE(SUMX('Table (2)',[Amount]),FILTER('Table (2)',[Date]=EARLIER([Date])))

balance = 
VAR _MAXNO = MAXX(FILTER(ALL('Table (2)'),'Table (2)'[Total] = MAX('Table'[Debit])),'Table (2)'[Invoice No])
return
IF(MAX('Table (2)'[Invoice No]) = _MAXNO,SUM('Table'[Debit]),BLANK())

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @VictorV ,

 

I made simple samples and you can check the results below:

vtianyichmsft_2-1713338004528.png

Total = CALCULATE(SUMX('Table (2)',[Amount]),FILTER('Table (2)',[Date]=EARLIER([Date])))

balance = 
VAR _MAXNO = MAXX(FILTER(ALL('Table (2)'),'Table (2)'[Total] = MAX('Table'[Debit])),'Table (2)'[Invoice No])
return
IF(MAX('Table (2)'[Invoice No]) = _MAXNO,SUM('Table'[Debit]),BLANK())

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

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.

FabCon and SQLCon Highlights Carousel

FabCon & SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.