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

View all the Fabric Data Days sessions on demand. View schedule

Reply
afrutos
Resolver I
Resolver I

Calculate in matrix

Hello everyone, how are you?
I have a question that I am having trouble solving.
I have a table with invoices (IdInvoices) and their amounts, on the other hand I have a table of Credit, which rectify these invoices, where I have (IDInvoice, idCredit, amounts)

I need to get the matrix in such a way that for each invoice I get the amount of that invoice, and in the lower row I get the amount of the credit note corresponding to that invoice, but I do not know how to calculate it.

Can someone help me? Thanks

afrutos_0-1651824962629.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, 

You can make a measure something like this:  if(isinscope[creditnote],sum(CreditnoteAmount), sum(invoiceAmount),

--> Isinscope[] captures the rowlevel, starts with the lowest/desired rowlevel.

---> IF function can be replaced by SWITCH() --> play with variables to make the measure better readable 

 

 


View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi, 

You can make a measure something like this:  if(isinscope[creditnote],sum(CreditnoteAmount), sum(invoiceAmount),

--> Isinscope[] captures the rowlevel, starts with the lowest/desired rowlevel.

---> IF function can be replaced by SWITCH() --> play with variables to make the measure better readable 

 

 


Shishir22
Solution Sage
Solution Sage

Hello @afrutos ,


Request you to please provide sample data with expected result in tabular format.

 

Cheers,

Shishir

Cheers,
Shishir

Hi yes, this is an example of what i need

afrutos_0-1651826039262.png

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors