Forum Discussion
SEARCH function using another column to find value in text string
- Anonymous2 years ago
Hi nmoriello ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
Customer table:
Table:
(2)We can create a new table.
Table 2 = var tmp=CROSSJOIN('Table',Customer) var tmp1=ADDCOLUMNS(tmp,"Flag",CONTAINSSTRINGEXACT([TranGLC_GLAcctContext],[Customer Name])) var tmp2=FILTER(tmp1,[Flag]=TRUE()) var tmp3=SELECTCOLUMNS(tmp2,"Customer Name",[Customer Name]) return tmp3(3)Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
nmoriello ok, what is the end goal? How big is your data table and customer table in terms of rows?
- nmoriello2 years agoFrequent Visitor
What i am trying to end up with is being able to use a DAX function (ive tried, CONTAINSSTRING, SEARCH, FIND) to look at my "Account Context" column and be able to idenify the matching customer name that i see within my "Customer Name" column.
The issue i am currently having is that using any of those functions (the way I know how) isnt giving me any results. Here is one DAX forumula I have tried:
MATCHING COLUMN = IF( SEARCH('FINAL Sales & Cost'[Customer Name], 'FINAL Sales & Cost'[TranGLC_GLAcctContext], 1, 0) > 0, "Match", "No Match" )
I am getting no matches for this.