Forum Discussion

crystalregan's avatar
crystalregan
New Member
1 year ago
Solved

What's wrong with this forumla?

IsMobile = IF (NOT(ISBLANK([Mobile_Provider__c] || (NOT(ISBLANK([Serviced_By_Mobile_Unit__c])), Yes,No)
  • Hi crystalregan,

    Thank you johnt75 and DataNinja777 for your response.

     

    The issue stems from the placement of parentheses and the use of || within ISBLANK. To resolve this, the formula should be written as follows:

    IsMobile =
    IF (
        NOT ( ISBLANK ( [Mobile_Provider__c] ) )
        || NOT ( ISBLANK ( [Serviced_By_Mobile_Unit__c] ) ),
        "Yes",
        "No"
    )

    This formula will return "Yes" if either Mobile_Provider__c or Serviced_By_Mobile_Unit__c has a value, and "No" if both are blank. If you require "Yes" only when both fields are populated, please use && instead of ||. I hope this provides clarity.

6 Replies

  • Hi crystalregan ,

     

    You need to check each column separately for blank, then OR the results:

    IsMobile =
    IF (
        NOT (
            ISBLANK ( [Mobile_Provider__c] )
            && ISBLANK ( [Serviced_By_Mobile_Unit__c] )
        ),
        "Yes",
        "No"
    )
    

    Alternatively, if you truly want an explicit OR, this is equivalent:

    IF (
        NOT ( ISBLANK ( [Mobile_Provider__c] ) )
            || NOT ( ISBLANK ( [Serviced_By_Mobile_Unit__c] ) ),
        "Yes",
        "No"
    )
    

     

    Best regards,

  • If you are adding this as a calculated column you just need to wrap Yes and No in "", so 

    IsMobile =
    IF (
        NOT ( ISBLANK ( [Mobile_Provider__c] ) )
            || NOT ( ISBLANK ( [Serviced_By_Mobile_Unit__c] ) ),
        "Yes",
        "No"
    )
    
  • v-sgandrathi's avatar
    v-sgandrathi
    Icon for Community Support rankCommunity Support

    Hi crystalregan,

    Thank you johnt75 and DataNinja777 for your response.

     

    The issue stems from the placement of parentheses and the use of || within ISBLANK. To resolve this, the formula should be written as follows:

    IsMobile =
    IF (
        NOT ( ISBLANK ( [Mobile_Provider__c] ) )
        || NOT ( ISBLANK ( [Serviced_By_Mobile_Unit__c] ) ),
        "Yes",
        "No"
    )

    This formula will return "Yes" if either Mobile_Provider__c or Serviced_By_Mobile_Unit__c has a value, and "No" if both are blank. If you require "Yes" only when both fields are populated, please use && instead of ||. I hope this provides clarity.

    • v-sgandrathi's avatar
      v-sgandrathi
      Icon for Community Support rankCommunity Support

      Hi crystalregan,

       

      Just wanted to follow up and confirm that everything has been going well on this. Please let me know if there’s anything from our end.
      Please feel free to reach out Microsoft fabric community forum.