I have a dataset that returns a measure and a bunch of dimensions. What I need to be able to do is calculate a sum of this measure based on one dimension. ie.. Sum(measure) where dimension = "Top". Any ideas on how to accomplish this.
Not sure if this solution will work for you, but you can add a Calculated Field to the Data Set, say: "FilteredQty", defined as (assuming Quantity is an integer):
Do you want the report user to interactively select a dimension value, and have the sum adjusted accordingly In that case, you could set up a filter on the dataset, where the expression is the dimension column value, the operator is "=" and the value to compare against is the input parameter value.
calculated sum
voko
alan lan
LabibaSeif
Not sure if this solution will work for you, but you can add a Calculated Field to the Data Set, say: "FilteredQty", defined as (assuming Quantity is an integer):
CInt(iif(Fields!Country.Value = "USA", Fields!Quantity.Value, 0))
Then in your report you can use this expression:
Sum(Fields!FilteredQty.Value), wich should return 4 rather than 10
To make it dynamic, "USA" can be replaced by a report parameter.
Allison
R.S
Dataset1
Country Quantity
USA 1
USA 3
CANADA 1
MEXICO 3
CANADA 2
The sysntax I would use in Business Objects would be:
SUM(QUANTITY) WHERE(COUNTRY = "USA")
this expression would return 4.