Hi!
i have to build a report for one of my coleague at work, but i ran into a deadlock
I have a matrix who drags data from a querry like this
| Product A | Product B | Product C | Product D | Total |
Unit A | 5 | 3 | 15 | 20 | |
Unit B | 15 | 10 | 2 | 2 | |
Unit C | 20 | 20 | 5 | 2 |
|
the grand total at the end at the row should be like this
=sum(Fields!SalesQty.Value)+IIF(sum(Fields!SalesQty.Value, "GroupbyProduct")>10,0,10-sum(Fields!SalesQty.Value, "GroupbyProduct"))
Meaning if the sum of SalesQty is les then 10, the difference between 10 and the sum(salesqty) sould lower the grand total
In this case on the first row the logic is like this : (5+3+15+20)+(10-5)+(10-3)+0+0
beeing a matrix - rows are grouped by unit and colums by product
i've tried formula like this
=sum(Fields!CantitateVanduta.Value,"unitate1")+IIF(sum(Fields!CantitateVanduta.Value,"GrupaProdus4")>10,0,10-sum(Fields!CantitateVanduta.Value,"GrupaProdus4"))
but i get the error:
The Value expression for the text box ‘Textbox436’ has a scope parameter that is not valid for an aggregate function. The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing
data region, or the name of a dataset.
----------------------------
i've checked the group name and they are ok
thank you in advance!
B.H.