Getting the total (sum) of an expression in an SSRS table

  • Hello

    I have a simple table in SSRS:

    Column 1 is the date an item was due to be delivered, column 2 the date it was delivered.

    I have added a third column and put in the expression:

    =IIF(fields!date1.value>fields!date2.value,"yes","no")

    which works fine: either 'yes' or 'no' appear next to the date value column to show if the item was delivered on time.

    This is a drill-down in a report, and when opened runs about 70 rows down, depending on the date parameters.

    I want now to add a text box (or row-total to my report) that shows a total of the no's and the yes's. I also want to work out as a % how many no's there were against a total of all the dates.

    Can you please suggest an expression I could use to do this? As my expression does not have a field name, I have struggled to work this out.

    Thanks

  • Add another calculated field to your dataset. Instead of:

    =IIF(fields!date1.value>fields!date2.value,"yes","no")

    use

    =IIF(fields!date1.value>fields!date2.value,1,0)

    then you can total that.

  • Thanks for the reply: worked very well.

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

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