As shown below image i have problem to calculated specific fields total.

I want to just calculate only two cells value like total=(total opening-qty) + (total purchase-qty) cell and opening, purchase, sales are all from Type Group.

Please tell me the Expression or tips.

enter image description here

有帮助吗?

解决方案

It's hard to tell without seeing your DataSet/report, but the expression would be similar to:

=Sum(IIf(Fields!Type.Value = "OPENING" or Fields!Type.Value = "PURCHASE"
  , Fields!qty.Value
  , Nothing)

This will take a SUM of all qty values, but it will ignore any Type rows that don't match the types you're specifying, i.e. OPENING and PURCHASE.

The most import thing is to make sure the expression is in the correct Scope, i.e. if you're grouping by Type the expression should be applied outside of that group Scope to make sure the expression is considering all the required rows.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top