This article applies to Microsoft Dynamics AX for all regions.
If sales price includes tax in Microsoft Dynamics AX 2012 R3, an incorrect margin is calculated on the "Sales performance by products" report.
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.
Open SQL Server Data Tools.
Click File, click Open, and then click Analysis Services Database.
Set the values for the server and database (for example, "Dynamics AX initial"), and then click OK.
In Solution Explorer, double-click Retail Cube.
On the Calculations tab, locate the [Gross profit margin] script in the Script Organizer.
Change the expression so that it includes the following formula:
[Measures].[Customer invoice line amount - accounting currency] - [Measures].[Cost of goods sold - accounting currency].
In the Script Organizer, locate the [Gross profit margin percentage] script.
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])
Save the solution.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.