• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 452
  • Last Modified:

total text column in ssrs

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
epicazo
Asked:
epicazo
  • 5
  • 3
1 Solution
 
planoczCommented:
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
 
epicazoAuthor Commented:
field is called MONTH1,MONTH2,MONTH3, etc... and these are NVARCHAR fields
0
 
planoczCommented:
do you want a total at the bottom of each column?
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
epicazoAuthor Commented:
I want to summarize each column except for the row that contains 2009-02, 2009.03, etc..
0
 
planoczCommented:
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
 
epicazoAuthor Commented:
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
 
epicazoAuthor Commented:
I figured it out.  

=IIF(Sum(cint(Fields!Month1.Value))<0,FIELDS!Month10.Value,Sum(cint(Fields!Month1.Value)))
0
 
epicazoAuthor Commented:
Questions could be deleted.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now