Solved

total text column in ssrs

Posted on 2011-03-09
8
437 Views
Last Modified: 2012-05-11
I Have a table that has text fields and I want to Total only those records that don't contain the "2009-02" format in them.  Is it possible in SSRS?

I tried this but it doesn't work.  

=IIF(Fields!Month4.Value <"2009",Fields!Month4.Value,Sum(cint(Fields!Month4.Value))
=IIF(Fields!Month4.Value <"2009",Fields!Month4.Value,Sum(cast(Fields!Month4.Value as int))

 SAMPLE DATA
0
Comment
Question by:epicazo
  • 5
  • 3
8 Comments
 
LVL 27

Expert Comment

by:planocz
ID: 35090363
where is this field coming from?  "2009-02" Is this a string field?
do you want a total at the bottom?
Please explain again.
0
 

Author Comment

by:epicazo
ID: 35097810
field is called MONTH1,MONTH2,MONTH3, etc... and these are NVARCHAR fields
0
 
LVL 27

Expert Comment

by:planocz
ID: 35097903
do you want a total at the bottom of each column?
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:epicazo
ID: 35101434
I want to summarize each column except for the row that contains 2009-02, 2009.03, etc..
0
 
LVL 27

Expert Comment

by:planocz
ID: 35102681
your example does not show me what you are wanting to do. You have 2011 in the example and no real way of showing the layout of want you are doing. If you are trying to not read a 2009-2 then the best way would be in your query and then just have the report print out the results.
0
 

Author Comment

by:epicazo
ID: 35112242
I hope I am able to explain myself on this...

I am in reporting services and the columns I am trying to get a SUM on MONTH1--MONTH24 and as depicted in the image above my data output is in text because I am running a crosstab SP to get the results for a 24 month period to include the HEADER (The header is the row of data that contains YYYY-MM) it is written then way becuse every month the header will be different.  

I want a summary on everything, except those that contain YYYY-MM

I tried this syntax  but it doesn't work for me:
=IIF(Fields!Month4.Value ="2009-03",Fields!Month4.Value,Sum(cint(Fields!Month4.Value))


Thanks...
0
 

Accepted Solution

by:
epicazo earned 0 total points
ID: 35113035
I figured it out.  

=IIF(Sum(cint(Fields!Month1.Value))<0,FIELDS!Month10.Value,Sum(cint(Fields!Month1.Value)))
0
 

Author Closing Comment

by:epicazo
ID: 35145576
Questions could be deleted.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question