Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
emembreno81
Frequent Visitor

Need help with converting and IF(OR(ISNUMBER formula into DAX

Hello!

 

I am converting a formula from Excel into Power BI.  The Excel formla is the following:

 

=IF(OR(ISNUMBER(SEARCH({"tbd"},Y104)),Y104="",),"INCOMPLETE","COMPLETE")

 

someone did help me out and provided a formula that does seem to be the start of what I'm trying to execute, but it looks like it might be looking for instances where "tbd" is the ONLY value in the cell whereas I need the formula to find instances where "tbd" shows up in the data located in each cell.  The formula provided is:

 

Invalid Color =
var _value =
if('rep v_asrt_mo_rep'[Color Short Description] = "" || 'rep v_asrt_mo_rep'[Color Short Description] = "tbd" , "INCOMPLETE","COMPLETE")

return
_value
 
I think this formula is missing the search functionality - or is there a way to rewrite this formula to also include a CONTAINS function?  
 
I would appreciate any help with this!  
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@emembreno81 , Try like

 

if('rep v_asrt_mo_rep'[Color Short Description] = "" || search("tbd",'rep v_asrt_mo_rep'[Color Short Description],,0)>0 , "INCOMPLETE","COMPLETE")

 

SEARCH and FIND: https://www.youtube.com/watch?v=mZt0HJw4gjQ&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=45

 

CONTAINSSTRING and CONTAINSSTRINGEXACT: https://www.youtube.com/watch?v=XbgLGDvWdWQ&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=44

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@emembreno81 , Try like

 

if('rep v_asrt_mo_rep'[Color Short Description] = "" || search("tbd",'rep v_asrt_mo_rep'[Color Short Description],,0)>0 , "INCOMPLETE","COMPLETE")

 

SEARCH and FIND: https://www.youtube.com/watch?v=mZt0HJw4gjQ&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=45

 

CONTAINSSTRING and CONTAINSSTRINGEXACT: https://www.youtube.com/watch?v=XbgLGDvWdWQ&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=44

Thank you so much!  This did the trick!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors