Forum Discussion
adamsumm
9 years agoFrequent Visitor
IF and Search Function for finding if a specific value exists in two columns
Hello, Very new to Power Bi so I am still trying to figure out how to complete some of the basics. I am attempting to create a new comlumn that will print either "Personal" or "Company" when sea...
- 9 years ago
Hi adamsumm,
Please try this formula:
personal = IF ( SEARCH ( "personal", new_call[description],, 0 ) > 0 || SEARCH ( "personal", new_call[Transfered_to.cmdb_ci],, 0 ) > 0, "Personal", "Company" )
Regards,
Yuliana Gu
v-yulgu-msft
Microsoft Employee
9 years agoHi adamsumm,
Please try this formula:
personal = IF ( SEARCH ( "personal", new_call[description],, 0 ) > 0 || SEARCH ( "personal", new_call[Transfered_to.cmdb_ci],, 0 ) > 0, "Personal", "Company" )
Regards,
Yuliana Gu
- adamsumm9 years agoFrequent Visitor
Perfect! thank you very much for helping out with this. I am confused about this section of the code "
,, 0 ) > 0"
I would love to learn so If your able to explain that would be great v-yulgu-msft
Thank you!!!!
- v-yulgu-msft9 years ago
Microsoft Employee
Hi adamsumm,
Here is a document introducing the usage of SEARCH function for your reference: SEARCH Function (DAX). It explains each part inside this function.
Regards,
Yuliana Gu- adamsumm9 years agoFrequent Visitor
Thank you! that site will help me out a lot!