I have been at this for a few days off and on and I cannot figure it out. I Have a row that does some calculation based on student population. IF the school is not named "Bad school" (not the real name) then i do the sum of the SRB value devided by 4 multiplied by 2 added to the sum of the non srb value divided by 6 multiplied by 2. I get srb and non srb values from a case in my sql.
I need the sum of that row but I cannot get anything to work. I would think it would just be (sum[Table]) but that throws errors. Is ther ean easy way to do this? What I have
I just need the total of the rows What I need I can't think of how to get the total with the bad school added in as .5 I have looked at some other answers to siilar questions but mine seems to have extra layers that complicate it
I'm adding this answer based on the assumptions I commented above so if this does not help, please provide all the details I asked for in the comments.
I started by creating a simple dataset using the following as my dataset query.
I then created a new report with a simple table, added the 3 column and then added a row group called
grpSchoolthat groups by 'school'.I added an expression to the group rows which is essentially the same as yours. The expression was this.
I then added a total row and just summed the srb and nonsrb columns, these are not required for this answer so can be ignored.
I then added the following expression to the total row.
Basically this evaluates you original expression over the whole dataset and sums the results. However, as the we need to evaluate based on each school, I have added a context to the sums so
Sum(Fields!srb.Value, "grpSchool")means the sum of srb within the context supplied, in the case the context is"grpSchool"which is the name of our row group.Finally, we need to do the same this with 'school' but obviously can't sum this so we can just use
MAX()as this will be the same for each row within each row group. We could have used MIN() to as this will always return the same value (either A, B or C depending on the group).Now we simply sum the results of values returned.
For reference, the report design looks like this...
and the final output looks like this..