Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2010
    Posts
    39

    Unanswered: SQl Server Reporting Services Aggragrate Function

    Can anybody help me with sql server reporting services

    I am using the following expression in one field to print aero if IA and SET ADJ are there.

    =IIF(Fields!Transaction_Code.Value="IA",0,IIF(Fiel ds!Transaction_Code.Value="SET ADJ",0,Fields!Charges.Value))



    But when I apply sum on this Field, it adds even those values which I have printed zero corresponding to IA and SET ADJ



    For eg:

    Charges Transaction Code Charges(Value I print using IFF condition)

    35 IA 0

    45 PIP 45

    45 PIP 45

    And the total which the sum expression is giving me is 35+45+45 = 125
    but I want it to print only 0+45+45 = 90

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    You're summing the wrong column! You want to summarise the expression column.

    Take your formula and make it a new calculated field in your dataset, then refer to this field for your totals.
    George
    Home | Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •