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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
sregimand
Frequent Visitor

Trying to link two tables together from D365 BC to create a report for posted invoices with sales $

Trying to link two tables together from D365 BC to create a report for posted invoices with sales $ amount. Here are the two tables:

1. PostedSalesCreditMemos

2. PostedSalesInvoice_Line

 

In 'postedSalesCreditMemos' [Amount_Including_VAT]  table there are few credits that need to be subtracted from postedSalesInvoice_Line[Amount_Including_VAT] table.

I am able to subtract the two columns from two tables with this measuring formula:

TotalSales Measure = sum(PostedSalesInvoice_Line[Amount_Including_VAT])-SUM(PostedSalesCreditMemos[Amount_Including_VAT])
 
However, I like to create a column or to run a measured statement to show each row, instead of the sum results. 
 
My table model is Many to Many (*.*)  ---> Cross Filter direction = Both
I have tried many different options to make my model to many-to-one or one-to-many with no success. 
 
Any help is appreciated.
 

 

4 REPLIES 4
amitchandak
Super User
Super User

@sregimand , Column in M-M would be a challenge. 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube


@amitchandak wrote:

@sregimand , Column in M-M would be a challenge. 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.



@amitchandak wrote:

@sregimand , Column in M-M would be a challenge. 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.


 

sregimand_0-1612501853603.png

sregimand_1-1612501932722.pngsregimand_2-1612502069203.png

Total Sales is correct, however when I try to subtract credit applied to an invoice the Total Measures becomes as negative. 

 

I have tried many ways of assoicating the two tables as many-to-one or one-to-many with no success. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.