web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

margin calculation in Customer top 100 report AX 2012

(0) ShareShare
ReportReport
Posted on by

Hi All, 

In the Customer top 100 SSRS report under Sales & Marketing > Reports > Statistics >Customer > Top 100, How Fields like Margin, Sales Quantity and Percentage are calculated. Please help with Table names and their respective fields as well to calculate.( I have got the amount and names from CustInvoiceJour table) But other above mentioned fields i'm not able to find.

Thanks, 

JataThakur

*This post is locked for comments

I have the same question (0)
  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    following path may answer all your questions, related to the report.

    \Classes\smmSalesRankingDP\processReport

  • Suggested answer
    Brandon Wiese Profile Picture
    17,788 on at

    Margin is typically calculated as Sales - Cost.  Margin percent is (Sales - Cost) / Sales.

    Cost for a Sales order invoice line is calculated from the InventTrans records associated with the CustInvoiceTrans record, i.e. InventTrans.CostAmountPosted + InventTrans.CostAmountAdjustment.

    Sales quantity is just CustInvoiceTrans.Qty, which is in the sales unit of measure.

  • Community Member Profile Picture
    on at

    Hi Brandon,

    I'm trying to get the Customer top 100 report through SQL query. I'm taking CUSTINVOICEJOUR Table for getting Customer Name and account. But not able to match with CUSTINVOICETRANS and INVENTTABLE. How to match it or please tel me to join on which column.

    Thanks,

    JataThakur

  • Brandon Wiese Profile Picture
    17,788 on at

    CustInvoiceTrans matches to InventTable on the ItemId field, and of course DataAreaId and Partition.  You can probably find this relationship in the AOT on the CustInvoiceTrans table.

  • Community Member Profile Picture
    on at

    Hi Brandon,

    I have tried to find the relationship, but its not working. Query which i'm using is here

    SELECT        ORDERACCOUNT AS CUSTOMER, INVOICINGNAME AS NAME, SUM(SALESBALANCE) AS AMOUNT

    FROM            CUSTINVOICEJOUR

    WHERE        (DATAAREAID = 'USMF')

    GROUP BY ORDERACCOUNT, INVOICINGNAME

    ORDER BY CUSTOMER

    But after that Margin, Sales Quantity and Percent not able to get it.

    Thanks,

    JataThakur

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans