Forum Discussion
What's wrong with this forumla?
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
- DataNinja777
Super User
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,
- johnt75
Super User
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
Community 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
Community 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.- crystalreganNew Member
All is well now, thank you!