Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top