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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Differance in values within the group

Status
Not open for further replies.

dvimm

Programmer
Apr 26, 2007
23
US
Hello,
I have a set of data grouped by month. I need to find the differance in values for each group for example

group Month
month Value
1/1/2007 300
1/1/2007 100

I need to see the differance of 200 in the group footer. How can I do this?

Thanks
 
create a formula, say "Difference"

maximum({TABLE.value}) - minimum({Table.value})

And put this into your group footer.

You may need to create a formula to check for/change to numerics... call it numericValue

If NumericText ({TABLE.value}) Then
ToNumber ({TABLE.value})
Else 0

Make sure you realise what the "Else 0" does and means to your difference

If so, then this changes the 1st formula to

maximum(@numericValue) - minimum(@numericValue)


Are you always going to get only two values in each group?

Kai.
 
The formula should be:

maximum({table.value},{table.date},"monthly") - minimum({table.value},{table.date},"monthly")

...if in fact you are comparing the largest value with the smallest per month.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top