May 3, 2013 at 1:52 pm
Hello,
I'd appreciate if you guys help me with my problem in a matrix. In the following SSRS 2008 matrix, notice I have a Row named FieldName, and only one field in the Data area named Value. My question is: Let's say we have Field 1, Field 2, and Field 3, and in the "Total" area of Field 3, I want to display the result of a division of Field1/Field2. How can this be done?
May 7, 2013 at 12:38 am
can you explain it more..
May 12, 2013 at 6:13 pm
Assuming your field1 and field2 are rows, you can create a row group. Generally groups rely on the dataset having the same value in a certain column.
e.g. If you have a "Country" column and some of the rows say "Canada" you can group rows by Country and all the "Canada" rows will be in the same group.
If you don't have any useful grouping column and you want to group all columns for the purpose of doing these totals, or divisions, you can use =1 as the grouping formula.
The easiest way to then do a total for the "sum[value] of field 1 / sum[value] of field 2" is to refer to the fields by their name (name of the cell/text box). Assuming you've named those cells "Field1total" and "Field2total"
So the formula looks somewhat like
=ReportItems!Field1total.Value/ReportItems!Field2total.Value
From there you need to be careful about not dividing by zero - for example if the Field2total cell is zero you will have further problems.
What I've said here may or may not work depending on your exact layout but the "ReportItems!" reference is super useful I've found.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply