Forum Discussion
YGoe
9 years agoNew Member
Search text DAX not working
Dear All, I am trying to perform an if test on a column that contains strings. After searching the web, I decided to use the search function. I keep running in an error telling me that a singl...
- 9 years ago
Is home accounts{acc_name] already a calculated column?
Try this one as a column
test = IF(IFERROR(SEARCH("Transient Retail",'home accounts'[acc_name]),-1)=1,10,0)
sokg
9 years agoSolution Supplier
Are you creating a column or a measure ?
YGoe
9 years agoNew Member
it is a measure. I tried creating a calculated column but the operation that follows the if statement creates a circular reference.
- sokg9 years agoSolution Supplier
Is home accounts{acc_name] already a calculated column?
Try this one as a column
test = IF(IFERROR(SEARCH("Transient Retail",'home accounts'[acc_name]),-1)=1,10,0)
- YGoe9 years agoNew Member
it works when creating a column :)
why does it fail when creating a new measure then?
- sokg9 years agoSolution Supplier
Because needs a row contex to work. When you try as a measure tries to read the whole column .