Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Wrong margin calculated in sales performance by products report if sales price includes tax in Microsoft Dynamics AX 2012 R3


View products that this article applies to.

This article applies to Microsoft Dynamics AX for all regions.

↑ Back to the top


Symptoms

If sales price includes tax in Microsoft Dynamics AX 2012 R3, an incorrect margin is calculated on the "Sales performance by products" report.

↑ Back to the top


Resolution

To resolve this issue, you must directly change the calculations in the cube.

Note To follow these steps, you must first deploy SQL Server Analysis Services.
  1. Open SQL Server Data Tools.
  2. Click File, click Open, and then click Analysis Services Database.
  3. Set the values for the server and database (for example, "Dynamics AX initial"), and then click OK.
  4. In Solution Explorer, double-click Retail Cube.
  5. On the Calculations tab, locate the [Gross profit margin] script in the Script Organizer.
  6. Change the expression so that it includes the following formula:
    [Measures].[Customer invoice line amount - accounting currency] - [Measures].[Cost of goods sold - accounting currency].
  7. In the Script Organizer, locate the [Gross profit margin percentage] script.
  8. Change the Expression so that it includes the following formula:
    (([Measures].[Customer invoice line amount - accounting currency] - [Measures].[Cost of goods sold - accounting currency]) / [Measures].[Customer invoice line amount - accounting currency])
  9. Save the solution.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


Keywords: kbtshoot, kbexpertiseinter, kbexpertisebeginner, kbexpertiseadvanced, kbmbspartner, kbnoloc, kb, kbmbsmigrate, kbmbsquickpub, kbsurveynew

↑ Back to the top

Article Info
Article ID : 3000505
Revision : 4
Created on : 2/17/2017
Published on : 2/17/2017
Exists online : False
Views : 220