我在 Access 中设置了以下两个查询。每个查询每个组织只有 1 行,并且两个查询的组织名称是一致的。
查询 A(基于表 A 的预算模型)
Org, Jan, Feb, ... Dec, Total
-----------------------------
A, $68, $25, ... $51, $809
B, $23, $39, ... $13, $423
...
E, $11, $90, ... $84, $789
查询 B(基于表 B 的预算模型)
Org, Jan, Feb, ... Dec, Total
-----------------------------
A, $67, $25, ... $70, $821
B, $23, $39, ... $13, $423
...
E, $15, $45, ... $71, $755
如何创建包含以下所有信息的报告?我很难将两个查询组合在一起,减去它们的值,然后最终在同一个报告/查询中显示总计行。
Jan, Feb, ... Dec, Total
Org A:
Model A: $68, $25, ..., $51, $809
Model B: $67, $25, ..., $70, $821
A - B : $ 1, $ 0, ..., ($19), ($12)
Org B:
Model A: $23, $39, ..., $13, $423
Model B: $23, $39, ..., $13, $423
A - B : $ 0, $ 0, ..., $ 0, $ 0
...
Org E:
Model A: $11, $90, ..., $84, $789
Model B: $15, $45, ..., $71, $755
A - B :($ 4),$45, ..., $13, $ 34
-------------------------------------------
Totals:
Model A: $102, $154, ..., $148, $2021
Model B: $105, $109, ..., $154, $1999
A - B :($ 3), $45, ..., ($ 6), $ 22