cancel
Showing results for 
Search instead for 
Did you mean: 

Grand total of the of Tables

cothmer
Participant
0 Kudos

I have a quantity field that displays the number of medication tablets ordered. The field is a string. For each patient it shows how many tablets were ordered. I want to get a grand total of all the tablets. Currently in the report the original report writer put this in a formula to convert the field. Here is the formula. How can I get a total count of all tablets ?

//Some numbers that are stored as string may have leading zeros. Convert these numbers to numeric, then back to string to remove leading zeros. //If the value is alphanumeric, return the original string value rather than converting it to a number.

IF NumericText({ORDER_MED.QUANTITY})
then ToText(ToNumber({ORDER_MED.QUANTITY}),0)
ELSE ({ORDER_MED.QUANTITY})

Accepted Solutions (0)

Answers (1)

Answers (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Curt,

1. Change the code to (or create a new formula):

IF NumericText({ORDER_MED.QUANTITY})
Then ToNumber({ORDER_MED.QUANTITY})
ELSE 0

2. Go to the Insert Summary option > Select this formula field as the Field to Summarize > Choose 'Sum' as the operation and place it on the Report Footer.

-Abhilash