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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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.


@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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors