Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如下图所示,我无法计算特定字段的总数。
我只想计算两个单元格值,例如 total=(total opening-qty) + (total purchase-qty)单元格,并且打开、购买、销售都来自 Type Group。
请告诉我表达式或提示。
没有看到您的数据集/报告很难判断,但表达式类似于:
=Sum(IIf(Fields!Type.Value = "OPENING" or Fields!Type.Value = "PURCHASE" , Fields!qty.Value , Nothing)
这将采用SUM所有qty值中的一个,但它将忽略任何与您指定的类型不匹配的Type行,即OPENING和PURCHASE。
SUM
最重要的是确保表达式在正确的范围内,即如果您按类型分组,则表达式应在该组范围之外应用,以确保表达式正在考虑所有必需的行。