none
Custom Field Formula in Report Builder

    Question

  • Is it possible to create a custom field in report builder using an IF statement with multiple conditions?

    It allows me to create a field with this Formula:

    IF(condition,True, False)  But not this Formula:

    IF(Condition OR Condtion OR Condition, True, False)

    Says it is expecting a "," at the first OR

    Friday, October 28, 2011 4:21 PM

Answers

All replies

  •  

    Hi,

     

    Please check the usage of “OR”:

     

    OR (Report Builder)

    http://msdn.microsoft.com/en-us/library/aa337280(v=SQL.90).aspx

     

    Considering designing in Report Builder this is about SQL Server, it is also recommended that you go to SQL Server Forum for help:

     

    SQL Server Forums

    http://social.msdn.microsoft.com/Forums/en/category/sqlserver

     

    Hope this helps.

     

    Thanks.
    Nicholas Li - MSFT
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Marked as answer by Bobby Grant Monday, October 31, 2011 5:24 PM
    Monday, October 31, 2011 3:54 AM
    Moderator
  • It looks like this only works for two conditions.   What if I need to have a list of condions 5 to 10 Conditions that would return as True and the remaining as false?  I am able to get the OR to work for 2 but when I add a third it gives me an error.

    Thank you for your help

    Monday, October 31, 2011 1:10 PM