dbTalk Databases Forums  

aggregate field X for duplicate field values Y

comp.databases.filemaker comp.databases.filemaker


Discuss aggregate field X for duplicate field values Y in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
grasshopper
 
Posts: n/a

Default aggregate field X for duplicate field values Y - 08-18-2005 , 02:59 AM






I'd like to create a field (a calculation/summary field?) that
calculates the total value of a field Z whose field X matches a grouped
value.

e.g.:

x: friuit y: banana z:19
x: friuit y: apple z:10
x: vegetable y: carrot z:3
x: vegetable y: tomato z:12
x: vegetable y: squash z:2

therefore, the totals woul be:
fruit: 29
vegetable: 17

and th aggregate calculation field would compute as:
x: friuit y: banana z:19 c_aggregateField: 29
x: friuit y: apple z:10 c_aggregateField: 29
x: vegetable y: carrot z:3 c_aggregateField: 17
x: vegetable y: tomato z:12 c_aggregateField: 17
x: vegetable y: squash z:2 c_aggregateField: 17


however, I'm stumped as to how to implement this in Filemaker.

any ideas?

thansks in advance.


Reply With Quote
  #2  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: aggregate field X for duplicate field values Y - 08-18-2005 , 04:01 AM






You create a relationship in the same file (self relationship) based on
the 'group' on both sides, and a field named 'aggregate' =
SUM(relationship::group)
Remi-Noel
(I may send you the little example I made to verify that, if you give me
a real address)


"grasshopper" <bob (AT) nowhere (DOT) com> a écrit dans le message de news:
2005081800594216807%bob (AT) nowherecom (DOT) ..
Quote:
I'd like to create a field (a calculation/summary field?) that
calculates the total value of a field Z whose field X matches a
grouped value.

e.g.:

x: friuit y: banana z:19
x: friuit y: apple z:10
x: vegetable y: carrot z:3
x: vegetable y: tomato z:12
x: vegetable y: squash z:2

therefore, the totals woul be:
fruit: 29
vegetable: 17

and th aggregate calculation field would compute as:
x: friuit y: banana z:19 c_aggregateField: 29
x: friuit y: apple z:10 c_aggregateField: 29
x: vegetable y: carrot z:3 c_aggregateField: 17
x: vegetable y: tomato z:12 c_aggregateField: 17
x: vegetable y: squash z:2 c_aggregateField: 17


however, I'm stumped as to how to implement this in Filemaker.

any ideas?

thansks in advance.




Reply With Quote
  #3  
Old   
grasshopper
 
Posts: n/a

Default Re: aggregate field X for duplicate field values Y - 08-19-2005 , 01:19 AM



you're The Man, Remi (http://www.themanmovie.com)

that worked like a charm, I always wondered how to do that.

thank you!
b.

On 2005-08-18 02:01:57 -0700, "Remi-Noel Menegaux" <rnmenegaux (AT) free (DOT) fr> said:

Quote:
You create a relationship in the same file (self relationship) based on
the 'group' on both sides, and a field named 'aggregate' =
SUM(relationship::group)
Remi-Noel
(I may send you the little example I made to verify that, if you give
me a real address)


"grasshopper" <bob (AT) nowhere (DOT) com> a écrit dans le message de news:
2005081800594216807%bob (AT) nowherecom (DOT) ..
I'd like to create a field (a calculation/summary field?) that
calculates the total value of a field Z whose field X matches a grouped
value.

e.g.:

x: friuit y: banana z:19
x: friuit y: apple z:10
x: vegetable y: carrot z:3
x: vegetable y: tomato z:12
x: vegetable y: squash z:2

therefore, the totals woul be:
fruit: 29
vegetable: 17

and th aggregate calculation field would compute as:
x: friuit y: banana z:19 c_aggregateField: 29
x: friuit y: apple z:10 c_aggregateField: 29
x: vegetable y: carrot z:3 c_aggregateField: 17
x: vegetable y: tomato z:12 c_aggregateField: 17
x: vegetable y: squash z:2 c_aggregateField: 17


however, I'm stumped as to how to implement this in Filemaker.

any ideas?

thansks in advance.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.