Using IIF to sum data
I am creating a report where I want to Sum data based on a Term. I'm trying to get a total into another text box on my report What I'm looking to do is somthing like this =Sum(IIF(Fields!Term.Value = "Q1", "Q2") Thanks in Advance for any help
June 16th, 2011 12:44pm

Can you please provide more details? IF the Term value = Q1, what would you want to do?
Free Windows Admin Tool Kit Click here and download it now
June 16th, 2011 12:48pm

Hi Wayne, Your syntax is in correct. You should try something like this:- = Sum ( IIf ( <condition>, True, False ) ) Thanks KumarKG, MCTS
June 16th, 2011 1:22pm

I think maybe you're looking for something like this. =Sum(IIF(Fields!Term.Value = <your needed value>, True Value, False value)) If you add quotes like that i believe youre going to get an error or its going to try and actually sum "Q1" to something.
Free Windows Admin Tool Kit Click here and download it now
June 16th, 2011 2:28pm

Hi Wayne557460, As _Kumar and thenmanAV posted above, the IIF function returns one of two values depending on whether the expression is true or not. Please elaborate your requirement with more details, it will benefit other community members to help you resolve this issue. For more information about functions and expression examples, please refer to the article below: http://msdn.microsoft.com/en-us/library/ms157328.aspx Thanks, Bin Long
June 18th, 2011 4:37am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics