Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSRS Percent Calculation Formula 1

Status
Not open for further replies.

aztech

IS-IT--Management
Apr 17, 2001
25
0
0
US
I am trying to calculate the percentage of attrition for our group business and I only need to see the ones that did not pick up their contracted room nights. Here's what I have:

=IIf(Fields!PickedUpGuestrooms.Value) < (Fields!AgreedGuestrooms.Value),(Fields!PickedUpGuestrooms.Value)/(Fields!AgreedGuestrooms.Value)

I also tried this:
=IIf((Fields!PickedUpGuestrooms.Value)<(Fields!AgreedGuestrooms.Value)),(Fields!PickedUpGuestrooms.Value / Fields!AgreedGuestrooms.Value)

I keep getting "wrong number of arguments" error. I tried different variations, but with no luck.

Thank you for any help you can give me.
 
The IIf function works like this:

=Iif(Logical Test, Value If True, Value If False)

So you will need to specify your value if false. If you want to use a 0, then your code would look like this:

Code:
=IIf(Fields!PickedUpGuestrooms.Value < (Fields!AgreedGuestrooms.Value),(Fields!PickedUpGuestrooms.Value)/(Fields!AgreedGuestrooms.Value), 0)
 
Thank you! That worked perfect. I'm new to SSRS, so your help is greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top