Forum Discussion
Search Function in DAX (wrong data type or an invalid value error)
- Anonymous4 years ago
Hi thomas_raphael , if you are trying to add a new column, you could consider using Power Query to perform this function. It may be easier to see the results.
Please note that SEARCH("RunID",Incidentes[Description3],,BLANK()) will return a number representing the starting position of the text. "Find Text Value" - if I use search to find "Text" the result will be 6. If the search fails, the result is BLANK(). You may need to change the BLANK() to either 1 or 1000.
This result could be passed to the second VAR function. But it will only find position of the first "," after this start positon. 1, 6 or 1000. It there is no "," is returns BLANK().
Please note that I have also changed the first variable, maybe that would help... 🙂
- thomas_raphael4 years agoFrequent Visitor
Oh, sorry for missing that part 😅
I didn't mentioned it but I've already tried -1 and 0 as <NotFoundValue> before posting this.
Considering Anonymous answer, it seems that <NotFoundValue> can't be < 0 in the first variable.
- goncalogeraldes4 years agoSuper User
Thanks for the feedback thomas_raphael ! 🙂