Solved

total text column in ssrs

Posted on 2011-03-09
8
442 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

 

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

Raise the IQ of Your IT Alerts

From IT major incidents to manufacturing line slowdowns, every business process generates insights that need to reach the people required to take action. You need a platform that integrates with your business tools to create fully enabled DevOps toolchains.

You need xMatters.

Question has a verified solution.

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

A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

690 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