Solved

How to calculate minimum value of a field within a group

Posted on 2006-11-06
8
306 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.
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 …

919 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now