Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Analysis Server and Reporting Services (2012)
 IIF Switching for expression? (Report Builder 3)
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

3 Posts

Posted - 03/09/2014 :  22:22:33  Show Profile  Reply with Quote
I'd like to limit the value of a calculated progress field to 100 (%) in the event the math reveals something > 100.
Right now the field looks something like:

Can I use an IIF or something similar here? Can I alias the output of the expression so it's look like:
=IIF((Sum(fields!ActutalTested.Value)/(Sum(fields!RequiredTested.Value)*100) AS RealResult <= 100, RealResult, 100)

Any ideas?


Aged Yak Warrior

United Kingdom
555 Posts

Posted - 04/01/2014 :  10:46:55  Show Profile  Reply with Quote
Cant check at the mo as Im not on a reporting server but the syntax is something like

=Sum(IIF(fields!ActutalTested.Value)/(Sum(fields!RequiredTested.Value)*100) <=100, RealResult, 100)

Some examples for you:
=sum(iif(Fields!DateDiffAll.Value >=0,1,0) and Fields!STATUS_NAME.Value <>"Closed") and Fields!ASSIGNED_GRP_NAME.Value ="this is a filter"

Use this dataadd
=Sum(IIF(Fields!Agreed_Solved_Date___Time.Value = DateAdd("d",-1, TODAY()),1,0))

=Sum(IIF(Fields!DateDiff.Value =0,1,0 and Fields!Agreed_Solved_Date___Time.Value = Today()))

We are the creators of our own reality!
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000