Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reporting Services Comparison Chart

Status
Not open for further replies.

digitallyskilled

IS-IT--Management
Sep 23, 2004
39
US
I am trying to compare one users total orders with the average of all users orders per project type. I have the query that gives me the data i need for the firs user but i need to somehow get the average of everyone else

I then want to display that data in a chart using reporting services

any suggestions?

SELECT
[Order].Id,
Users.FirstName,
Users.LastName,
[Order].CreatorId,
ProjectType.ProjectType,
[Order].ProjectTypeId
FROM [ORDER]
INNER JOIN Users ON [Order].CreatorId = Users.[Id]
INNER JOIN ProjectType on [ORDER].ProjectTypeId = ProjectType.Id
Where [Order].CreatorId = @CreatorId and [Order].ProjectTypeId NOT IN (12,13,14)
 
I would say get rid off Where [Order].CreatorId = @CreatorId since CreatorId = Users.[Id]


“I sense many useless updates in you... Useless updates lead to fragmentation... Fragmentation leads to downtime...Downtime leads to suffering..Fragmentation is the path to the darkside.. DBCC INDEXDEFRAG and DBCC DBREINDEX are the force...May the force be with you" --
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top