Solved

total text column in ssrs

Posted on 2011-03-09
8
427 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
Comment Utility
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
Comment Utility
field is called MONTH1,MONTH2,MONTH3, etc... and these are NVARCHAR fields
0
 
LVL 27

Expert Comment

by:planocz
Comment Utility
do you want a total at the bottom of each column?
0
 

Author Comment

by:epicazo
Comment Utility
I want to summarize each column except for the row that contains 2009-02, 2009.03, etc..
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 27

Expert Comment

by:planocz
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Questions could be deleted.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
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…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now