# Report Desk: Calculating Percentage

Elliott V8.6

Released: 4/28/23

## Calculating Percentage

When you want to display a percentage on a report, you most likely will use a format like "N0" or "N1" or "N2," depending on the number of decimals you require.

Also, you will need to create a formula to calculate the percentage. For example, if you wanted to calculate a salesperson's percent of the total sales, you would use a formula something like the following:

`SUM(ORDER_TOTAL_SALE_AMT) / SLM_SALES_PTD`

Of course, that might produce a number like 0.2222, if the percentage was 22.22%. More than likely, you would want to express that as 22 or 22.2 or 22.22. To do that you need to modify the function to something like this:

```
````(SUM(ORDER_TOTAL_SALE_AMT) * 100) / SLM_SALES_PTD `

This would produce the desired result.

The mathematician in you might want to enter the formula the following way:

` (SUM(ORDER_TOTAL_SALE_AMT) / SLM_SALES_PTD) * 100`

... since the two formulas are mathematically equivalent. However, due to potential truncation during the internal calculations, if you multiply by 100

*after*the division, the result might display as 22.00 instead of 22.22 -- you might lose some precision on the right side of the decimal..

**For this reason, we recommend that you always multiply by 100**

**before**

** doing the division.**

JEG