Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
opensourcederry
Starting Member
12 Posts |
Posted - 2012-09-04 : 07:29:16
|
Hi all,SQL 2008 report builder.I have a strange problem with the displaying of averages using the AVG function,I have a tablix which has row groups of country and state.In my data set I also have a field called countme and this is set to 1.Within each grouping I am summing countme so I use SUM(fields!countme) at each grouping level and this works correctly.So imagine on screen the report isCountry State TotalUSA 365 NY 75 SC 75 CA 75 FL 75 LA 65The issue is that instead of having a total at the country level we wish to have an average, so at the country grouping level I amend the column to show AVG(fields!countme)Using the example above, rather than showing an average of 73 the formula returns 1 (or 1.00 if I set the text box to 2 decimal places)Any suggestions on this? I have tried various solutions but to no avail including reference the grouping scope eg AVG(fields!countme, "country")Any ideas?Thanks in advance,osd |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-09-05 : 21:53:17
|
whats the datatype of countme? also whats the format you've selected in SSRS?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|