Solved

How to calculate minimum value of a field within a group

Posted on 2006-11-06
8
313 Views
Last Modified: 2012-05-05
I was able to easily setup a summary to get the maximum value of a given field within a group, but now I need to figure out the minimum value of the same field.  The problem is the value of Zero should not be counted as the minimum value.  Let's say the field contains three values: 0.00, 1.12, and 87.3.  The minimum value should be 1.12 instead of 0.00.  How could I accomplish this?  Thanks for any feedback.
0
Comment
Question by:cmp119
8 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 17884664
Hi cmp119,
Use a running total field to get the minimum.
Reset for each group and in the Evaluate For use a formula which says something like...
{table.field} <>0

Pete

0
 
LVL 17

Expert Comment

by:MIKE
ID: 17884685
Do you need to see the items that have 0.00? IF NOT, then just remove them from your report using SELECT EXPERT.

choose the value...and assign GREATER THAN ">" 0.00.

MikeV
0
 

Author Comment

by:cmp119
ID: 17884763
I tried your suggestions and they didn't work.  I search your site  a bit more and discovered the below resolution to work fine.  Thanks so much for your feedback.  I should of done a more thorough search before asking.  Thanks.

Accepted Answer from frodoman
Date: 08/14/2004 06:58PM PDT
Grade: A
 Accepted Answer  


So what you want is the lowest value within each group, right?  In that case do this:

In the report header create this formula:

     shared numberVar SmallestFound;

In the group header create this formula (just use a value larger than anything you'll see in your report):

     shared numberVar SmallestFound := 99999;

In the details section create this formula:

     if {table.field} > 0 and {table.field} < shared numberVar SmallestFound then shared numberVar SmallestFound := {table.field};

In the group footer put this formula:

    shared numberVar SmallestFound;


You can suppress any of these formula so they aren't visible on the report.

HTH

frodoman
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

Author Comment

by:cmp119
ID: 17884793
I think the points should go to frodoman if anyone, but I could not figure out how to do it.  Otherwise, the question should be removed.  Thanks again.
0
 
LVL 17

Expert Comment

by:MIKE
ID: 17884832
Sounds good....

MikeV
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 18136504
PAQed with points refunded (250)

Computer101
EE Admin
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
String to Date Formula Failure 2 47
Crystal Reports Server, Unable to remove users 8 42
Crystal Reports total formula with groups? 4 48
Crystal Reports Version 7 4 25
Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question