问题描述
因此,有人要求我使用Filemaker将一个包含一些财务信息以及其他数据的大型数据库放在一起.来自MSSQL背景,许多命令对我来说似乎是抽象的.我想要的最简单的方法之一是基于数据类型列的value列的摘要:
So I've been asked to use Filemaker to put together a large DB consisting of some financial information, alongside other data. Coming from a MSSQL background, many of the commands seem abstract to me. One of the simplest I'd like is a summary of a value column based on a data type column:
DataType|Value
1 |10
1 |20
1 |10
2 |5
2 |10
我要查找DataType 1 = 40和DataType 2 = 15的结果.这在使用GROUP BY子句的SQL中非常简单,但是FM在计算字段中查找区域时遇到问题区域以通过另一个(数据类型)中的更改求和一个字段(值).
I'd be looking for the result of DataType 1 = 40 and DataType 2 = 15. This would be straightforward in SQL using a GROUP BY clause etc, but I'm having issues in FM finding an area within the calculation field area to Sum a field (value) by changes in another (DataType).
是否可以直接执行此操作,或者ExecuteSQL是最佳选择?
Is there a way to do this directly, or would ExecuteSQL be the best option?
推荐答案
在Filemaker中执行此操作的本机"方法是生成报告,并按DataType对记录进行排序.使用定义为[值]的总计的摘要字段来提供摘要.将此字段放在子摘要部分中以显示每个已排序组的子摘要值.将相同的字段放在摘要部分中以显示总体总数.
The "native" way to do this in Filemaker is to produce a report, with records being sorted by DataType. Use a summary field, defined as Total of [Value] to provide the summaries. Place this field in a sub-summary part to show the sub-summary value for each sorted group. Place the same field in a grand summary part to show the overall total.
另请参见: http://www .filemaker.com/help/13/fmp/zh-CN/html/func_ref3.33.47.html#1029667
这篇关于按组分组的Filemaker总和的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!