# Thread: Summary Function Fileds A4 to A5

1. ## Summary Function Fileds A4 to A5

I'm trying to convert my A4 app to A5.

A4 had several choices in the Types of Summary field selections. There was Total, Count, First, Last, Biggest and Smallest. I'm interested in replacing the "Biggest" function. This function will retain the highest number in the column of numbers it was tracking. I.e, if the column contained numbers 13, 49 and 66, the summary field would print 66.

How would I replace this function in A5v10?

Thanx,
Frank

2. ## Re: Summary Function Fileds A4 to A5

Check the help file topics for tableMax(). It could be used in a calculated field expression for your table, form, or report.

Here's what the expression would look like to get the max field value for the "Extension" field in the "Invoice_items" table of AlphaSports

Code:
`tablemax("invoice_items",".t.","Extension")`
-- tom

ps. Welcome to AlphaFive!

3. ## Re: Summary Function Fileds A4 to A5

Exactly what I needed. Thank you, and thanks for the welcome.

Frank

4. ## Re: Summary Function Fileds A4 to A5

Hi Tom (or anyone reading this),

I have finally run my report using "real situation" data. I find that Tablemax does not quite replace the A4 "highest" function.

For my report, I need to find the "highest" value in the parent of the current set based on a filtered or group value. The Tablemax function returns the "highest" value on the parent table regardless of group/filters.

If tried a calculation using the IF funtion to compare values and conditionally retain the highest value, however, the false side of the IF is zeroing out the retained value. See below:

Variable:
HIHI = 0

Calc:
IF(Ediv->Invalue > Var->HIHI,Var->HIHI=Ediv->Invalue,Var->HIHI=Var->HIHI)

I'm thinking an xbasic IF script with a null ELSE might do the trick, but I don't know how or where to get this in my report.

Thanks for your help in advance,
Frank

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•