"Group By" calculation
am 18.04.2008 03:59:23 von Diego B
Hi all,
I would like to group a field basing on another (categorical) field,
and I know that
using subsummary parts is very easy.
But, is that possible to group the field C by field B, already grouped
by field A
using a calculation ?
I tried GetSummary, but I think I am wrong in something, I was not
able to
get it work.
Thank you in advance,
Diego
Re: "Group By" calculation
am 19.04.2008 08:29:37 von Helpful Harry
In article
<1f0eaf1a-1149-4f51-beb0-9bb2659826ee@f63g2000hsf.googlegroups.com>,
Diego B wrote:
> Hi all,
>
> I would like to group a field basing on another (categorical) field,
> and I know that using subsummary parts is very easy.
> But, is that possible to group the field C by field B, already grouped
> by field A using a calculation ?
> I tried GetSummary, but I think I am wrong in something, I was not
> able to get it work.
Unless something has changed in newer versions of FileMaker, the
GetSummary can only "sort" records by a single field, so a multiple
breakdown as you want cannot be done that easily.
What you can do is create a new Calculation field (or normal field with
Auto-enter by Calculation option) that combines the three fields in the
same order as you would sort them for the Sub-summary report. This new
field can then be used in the GetSummary function.
For example, if you want the Sort Order for a Sub-summary report to be:
Field_A
Field_B
Field_C
then you can create a new Calculation field as:
MySortField Calculation, Text Result
= Field_A & " " & Field_B & " " & Field_C
This gives you a way of grouping records that are within the same
Field_C by Field_B by Field_A sub-group.
Then the Calculation field using the GetSummary function will be:
MySummary Calculation, Number Result
= GetSummary(SummaryField; MySortField)
You may have a problem if the data in Field_A or Field_A and Field_B is
"too long" since FileMaker won't see Field_C (or perhaps not all of
Field_C) and therefore think two slightly different data are the same.
For example,
This is a very long sentence with many many characters 1
may look the same to FileMaker as
This is a very long sentence with many many characters 2
if the "1" and "2" are past its number of characters limit.
I can't remember what the limit is, but it should not be a problem
unless the data in those first two fields is VERY long and very similar
between records.
Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)