Report Desk: Calculating Percentage

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

    • Related Articles

    • How to Investigate or Debug Report Desk Problem by Using Registry Keys

      Release Date: 01/25/2025 Version: 8.6 & Up Report Desk is based on the PSQL relational engine. It sends a SQL statement to PSQL engine to retrieve data. Sometimes, you don't get the result back that you expected, so what next? For example, when you ...
    • How to Investigate or Debug Report Desk Problem by Using SQL Statement

      Released Date: 1/25/2025 Version: 8.6 & Higher Report Desk is based on the PSQL relational engine. It sends a SQL statement to the PSQL engine to retrieve data. Sometimes, you don't get the result back as you expected, so what next? For example, when ...
    • Feature: Report Desk AR Statement

      Release date: 5/5/2023 Elliott Version: 8.6 Overview Beginning with Elliott version 8.6, there is a new ability to create more professional looking Accounts Receivable statements. The following standard features are included: Accounts are ...
    • Developing a New Elliott V8.6 Report Desk User Defined Report (UDR)

      'Release Date: 6/20/2018 Version: 8.6 & Up This document is written for licensed Elliott Software developers. It is not relevant for regular Elliott users. Overview With proper licensing, Elliott developers can follow these three steps to create a ...
    • Elliott 8.6 Database Convention & Report Desk/PowerSearch

      Release Date: 08/27/2021 Revision Date: 4/11/2022 Version: 8.6 Elliott 8.6 Database Naming Convention Elliott 8.6 now supports Report Desk and PowerSearch, features based on the PSQL relational database engine. Databases must be created for Report ...