Solved

How to calculate minimum value of a field within a group

Posted on 2006-11-06
8
354 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

 

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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

726 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