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.

 All Forums
 Development Tools
 Reporting Services Development
 Calculate Columns value

Author  Topic 

sanjay_jadam
Yak Posting Veteran

53 Posts

Posted - 2006-01-09 : 08:35:16
Hi to all,
I have created Matrix reports

My result set of stored procedure is
Name Date Values
Item1 1/1/2004 10
Item1 2/1/2004 10
Item1 3/1/2004 10
Item1 1/1/2005 10
Item1 2/1/2005 10

i shown my report like
Name in Row
Date in Column
Value in Details
i want to calculate value according to year
means in 2004 value of item1 is 30
and 2005 value is 20

how can i do this?
Please help me ASAP

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2006-01-09 : 09:36:24
If ur requirement is a SQL Query:

U can Use Group By along with Sum() and year() functions to get ur desired result.
Please go thru the BOL and comeback if u want more help.

I'll give u the logic (but u implement the query by modifying it)
Select [Name], [Date], Sum([Value] ) from tbl Group by [Name], year([Date])
Go to Top of Page
   

- Advertisement -