Forum Discussion

jamiehandelman's avatar
jamiehandelman
Frequent Visitor
5 years ago

Calculating Net Sales from 2 Different Columns

Hello - 

 

I am trying to calculate net sales: Total invoiced amount - amount returned 

Table 1: contains column "total amount" 

Table 2: contains column "amount returned" 

They are related via a table of distinct customers (table 3), we also have a table in the data model with manufacturers 

 

I need to show net sales over a given period of time per customer and per manufacturer (different visuals). I can screenshot relationships if need be. 

 

I have tried many different measures and calculated columns but nothing seems to be working correctly. Any ideas? Thanks!

3 Replies

  • vanessafvg's avatar
    vanessafvg
    Community Champion
    can you tell me what you have done already and what the issues are?

    if your tables are joined essentially you should be able to create the measures, if you can share some data data or screenshot the relationships that would be useful and a copy of the measures that aren't working.


    • jamiehandelman's avatar
      jamiehandelman
      Frequent Visitor

      vanessafvg thanks for the reply. The issue is that net sales for customer or manufacturer are not displaying correctly - which makes me think it's an issue with relationships. 

       

      I tried adding measures and calculated columns (using the formula screenshotted below) on both "PostedSalesInvoiceSalesInvLines" and "PostedSalesInvoices". The total amount comes from "PostedSalesInvoiceSalesInvLines" and the amount returned comes from "PostedSalesCreditMemosLines". 

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        Hi,

        Share the link from where i can download your PBI file.  To void confusion, please remove the tables which are not required.  Also, please show the expected result very clearly.