# Choosing your calculation priority for totals and calculations

Report Definitions in Management Reporter have a setting for Calculation priority on the Settings tab. By default the setting has row calculations being performed first and then column calculations. Most people do not even know about this setting because 95% of the time you never need to change it. However, every now then you have a report with intersecting calculations and your totals or calculations are incorrect. When this happens you need to change the setting to calculate column calculations first and row calculations second. Let's look at a common example.

This report is a trended income statement that shows Gross Profit % and a Total column that adds together all the months. When you look at the Gross Profit % total line it is incorrect, showing a gross profit percentage of 1102%.

*Figure 1: Trended Income Statement with incorrect Gross Profit % total*

The row definition has a simple calculation for the Gross Profit % and the column definition has a calculated column for the total.

*Figure 2: Row and column definition*

To correct the Gross Profit % total, you need to change the Calculation priority setting in the Report Definition to Perform column calculation first and then row.

*Figure 3: Report definition*

Now the report will show you the correct total for the Gross Profit %.

*Figure 4: Trended Income Statement with correct Gross Profit % total*

Changing the calculation priority when there are intersecting calculated and total rows will save you time from creating complex calculations to get around the issue.