What is the best way to sum grand total a calculated text box within a group? In the example below, each part will have a calculated sum total value for each row. I then want to sum all those grouped part’s total into a grand total. I tried doing a sum on the text box name but that didn’t work.
When I had to do something similar to this, I ended up having to calculate the value in an expression. Be careful that your group doesn’t include duplicate values. If it does, and you can’t filter out the duplicates, hopefully you can at least count the duplicates and divide by that number to get your grand total. Sometimes I will include a flag in my BAQ (if possible) to help identify the fields to sum.
In this example I refer to the calculated field before summing the results. If OpRow is 1, then I sum the values from EstSetHours, if the OpRow is anything else, then nothing is added to the grand total.
For example:
=Sum(iif(Fields!Calculated_OpRow.Value=1,Fields!JobOper_EstSetHours.Value,Nothing))
I hope this helps. If not, post back with a bit more detail about what you are trying to sum.
Good luck!
What is the calculated_OpRow.Value=1 referencing to? I am trying to sum the value of the calculated field. For example, the $(DocExtPrice) text box is already a calculated field and just need to sum total it for all rows within that subreport.
I believe that in SSRS you don’t sum the field names, you can only sum the values from the table (datasource) So instead of trying to sum the calculated DocExtPrice text box, make the expression for your sum a compound expression that says sum(whatever the expression is that returns the text box value). Make sure you make a group (you will need some field to group by) so that you can sum the values in that group.
In my case, this is a calculated field in my BAQ that returns 1 through X, where X is the total number of ops in a given job. I think I got to that value using a RowNumber function in SQL.