Author |
Topic |
rsober
Starting Member
5 Posts |
Posted - 2009-05-08 : 12:00:45
|
I have a matrix where I format the column group to 0 decimal places. I don't want to round in the sql. There are cases where the Add Total is off by 1 because of how it sums the fields and then rounds whereas the numbers in each row are rounded first.Is there a way to total the column based on the values in the ReportItem versus in the Field? |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-05-08 : 13:29:27
|
are you applying round function or are you just selecting appropriate format in cell properties? |
|
|
rsober
Starting Member
5 Posts |
Posted - 2009-05-08 : 13:37:41
|
I am using the formatting function. Everything formats correctly, but one one case, it rounds and then adds whereas the total field adds and then rounds. As you can see from the example below, if the row details are the first 4 rows and you round them, the total is 99, but if you add them up and then round, it is 100.87.7 880.4 01.3 110.2 1099.6 99 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-05-08 : 13:58:23
|
whats the expression you gave in matrix? also can i assume the total you're speaking is generated by means of standard subtotal column? |
|
|
rsober
Starting Member
5 Posts |
Posted - 2009-05-08 : 14:24:34
|
The expression for the total is =Sum(Fields!Total_Emissions_CO2e.Value)I am selecting the row header, right mouse click and select "Add Total" to have it create the total expression. Ideally, I want to add the values in the ReportItem. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-05-08 : 14:31:51
|
ok make it like this and try=IIF(Inscope("Your Column group Name Here "),Sum(Fields!Total_Emissions_CO2e.Value),Sum(Fields!Total_Emissions_CO2e.Value,"Your Column group Name Here")) |
|
|
rsober
Starting Member
5 Posts |
Posted - 2009-05-11 : 14:55:08
|
I tried putting this expression on the total field but it didn't solve the problem |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-05-15 : 14:42:38
|
what happened when you put it? did it gave some error? |
|
|
rsober
Starting Member
5 Posts |
Posted - 2009-05-15 : 15:57:50
|
It ran but the total still rounded so it didn't equal the total of each row shown |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-05-16 : 03:54:32
|
can you remove format function and try putting the relevant format in format properties of cell? |
|
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2009-05-18 : 12:01:14
|
You could have your SQL query do the rounding for you for your detail lines, thus guaranteeing that the report processor sums the already rounded values and your column then foots properly.--------------------------------------------Brand yourself at EmeraldCityDomains.com |
|
|
|