Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comparing 2 sums based on a group from a same field

Status
Not open for further replies.

veles

Technical User
Sep 1, 2006
57
CA
Hi,

I need some help on a formula using crystal XI. I am trying to compare sums based on groups from a field.

I have a field that hold items like bus, car, truck, road, river, air let's call it (Field1}. I have a formula that creates groups:
if (Field1} in [bus, car, truck] then "vehicle"
else if (Field1} in [bus, car, truck] then "transport type"

Each of the items have a number value like bus(5), car (3), truck(5), road(2), river(3), air (0)
I have done a summary based on the groups
so the "vehicle" group sum is 13
and the "transport type" sum is 5

I need to compare sum of group "vehicle" and sum of group "transport type" to se if the sums are the same number (true or False) and then I will filter the report to show only the False.

I hope I explained it good enough and yes this is just an example, not the actual data.

Thanks
 
you could set up 2 Running Totals. Select "Evaluate on Formula" then have one evaluate if your groups formula is "vehicle" and the other if it is "transport type"

have both set to ever Reset.

then in the report footer you can see if the two are equal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top