Average Function Issue
hello gurus,
i working on report in ssrs 2005 , add columns show average score, continually throws "group by" error. not seeing?
select avg(responses_2010.totalscore) avg_score, responses_2010.locality, responses_2010.section1totalpoints, responses_2010.section2totalpoints,
responses_2010.section3totalpoints, responses_2010.section4totalpoints, responses_2010.section5totalpoints, responses_2010.section6totalpoints,
responses_2010.section7totalpoints, responses_2010.section8totalpoints, responses_2010.section9totalpoints,
responses_2010.section10totalpoints, responses_2010.totalscore, localities.localityname, localities.region
from responses_2010 right outer join
localities on responses_2010.locality = localities.localityname
where (responses_2010.locality <> 'test locality') , (region in (@region))
thanks in advance!!
try :-
select avg(responses_2010.totalscore) avg_score, responses_2010.locality, responses_2010.section1totalpoints, responses_2010.section2totalpoints,
responses_2010.section3totalpoints, responses_2010.section4totalpoints, responses_2010.section5totalpoints, responses_2010.section6totalpoints,
responses_2010.section7totalpoints, responses_2010.section8totalpoints, responses_2010.section9totalpoints,
responses_2010.section10totalpoints, responses_2010.totalscore, localities.localityname, localities.region
from responses_2010 right outer join
localities on responses_2010.locality = localities.localityname
where (responses_2010.locality <> 'test locality') , (region in (@region))
group by
responses_2010.locality, responses_2010.section1totalpoints, responses_2010.section2totalpoints,
responses_2010.section3totalpoints, responses_2010.section4totalpoints, responses_2010.section5totalpoints, responses_2010.section6totalpoints,
responses_2010.section7totalpoints, responses_2010.section8totalpoints, responses_2010.section9totalpoints,
responses_2010.section10totalpoints, responses_2010.totalscore, localities.localityname, localities.region
~~ mark answer if find correct~~
SQL Server > SQL Server Reporting Services, Power View
Comments
Post a Comment