Sum across Column on every row

Poh CS 1 Reputation point


Hi Everyone!

I am checking if it is possible to do a sum across horizontally for my Raw Cost Column to show on Column 1,
for every row.
Currently i am using a custom code but doesnt seem to add up correctly on the 2nd row record onwards
Currently Raw Cost column is a complex calculation due to many modification done throughout the months and the SQL query contains almost 800 lines which is too much of a effort to review and change it.
Expression for the source column Raw Cost
Fields!CostMonth.Value <=DateAdd("d",Reportitems!Length_Of_Job.Value,Reportitems!Est_Start_Date2.Value)

Code Snippet for getting the Total Horizontally in Column 1
Dim public nettotal_rawcost as Double
Public Function Getvaluerawcost (ByVal Proposed_Raw_Cost AS Double) AS Double
nettotal_rawcost = nettotal_rawcost + Proposed_Raw_Cost
return Proposed_Raw_Cost
End Function
Public Function Totalvaluerawcost()
return nettotal_rawcost
End Function

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,555 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Joyzhao-MSFT 15,511 Reputation points

    Hi @Poh CS ,
    If your Tablix is a matrix and you need to sum a field in the matrix, just select the field - Add Total - Column




    If I misunderstand what you mean, please feel free to correct me.
    Best Regards,

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.