Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SSRS need help using inscope with a matrix
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cseward
Starting Member

24 Posts

Posted - 06/15/2015 :  12:54:20  Show Profile  Reply with Quote
I have a simple matrix. The row group is schoolname. The column group is tweek. and the data field is thours (sum(thours)). on the right side of my matrix, I want to display the Average hours for all the week columns. SSRS can do a sum very simply, but when I use the avg function, I get erroneous results. I've googled this problem and can't find an explanation that I understand. Do I somehow use the inscope function in the data field ?? I just don't know. and I don't understand how to use the inscope function

kostya1122
Starting Member

15 Posts

Posted - 06/15/2015 :  21:02:56  Show Profile  Reply with Quote
maybe
sum(thours)\DATEDIFF(DateInterval.WeekOfYear,startdate,enddate)
Go to Top of Page

cseward
Starting Member

24 Posts

Posted - 06/16/2015 :  08:03:25  Show Profile  Reply with Quote
your solution has the scope problem as well :(

But, thank you for the suggestion :)
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.17 seconds. Powered By: Snitz Forums 2000