New to SSRS help ! write expression according to condition

  • 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

  • Hi,

    Try this

    =SUM(IIF(Fields!tickets.value = "P" or Fields!tickets.value = "C" and Fields!ticket_date.Value = today()-1, 1, 0))

  • In plain english what does "today()-1, 1, 0" mean in the example code you posted?

  • =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

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply