Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

New to SSRS help ! write expression according to condition Expand / Collapse
Author
Message
Posted Wednesday, March 17, 2010 10:47 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, March 26, 2011 3:17 AM
Points: 8, Visits: 65
hey guys i am very new to SSRS 2008,
I have to design one expresion for one text box which will give count of some fields.
ex. want to count total number tickets with status P or T or C for yesterday.
As we cant use where clause while writting expession here , i nt been able to write the expression

want working expression for following condition

count(fields!tickets.value = "P" or "C") where ticket_date <>today()

it should give the count of tickets for the date not equal to today

Your timely help will be appreciated

Regards,
Shekhar
Post #884870
Posted Saturday, March 20, 2010 5:35 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Monday, April 07, 2014 3:10 AM
Points: 609, Visits: 242
Hi,

Try this

=SUM(IIF(Fields!tickets.value = "P" or Fields!tickets.value = "C" and Fields!ticket_date.Value = today()-1, 1, 0))
Post #886877
Posted Tuesday, March 23, 2010 10:16 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, September 17, 2010 5:24 AM
Points: 14, Visits: 31
In plain english what does "today()-1, 1, 0" mean in the example code you posted?
Post #888295
Posted Saturday, January 29, 2011 9:09 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, January 29, 2011 9:09 PM
Points: 4, Visits: 3
=SUM(IIF(Fields!tickets.value = "P" or Fields!tickets.value = "C" and Fields!ticket_date.Value = today()-1, 1, 0))

today()-1 is today date - 1, 1 is the condition for the iffstatatemet, and 0 is when it fault.
http://ssrsdeveloper.blogspot.com/2011/01/new-to-ssrs-what-you-need.html
Post #1055857
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse