Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hello,
I am trying to use a column name "Account Context" that is a Text string field (ex. ADJ:191907 SPORTS INC.) which contains some random integers as well as a customer name.
I want to be able to search the "Account Context" column and match it up with a Customer Name that is within my "Customer Name" column.
I have tried this a few different ways and cannot seem to get the DAX formula that can actually SEARCH the "Account Context" field and get a result.
any help would be great!!
Solved! Go to Solution.
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.
Hi @nmoriello ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a calculated column.
Column = IF(CONTAINSSTRINGEXACT([TranGLC_GLAcctContext],[Customer Name])=TRUE(),"Match","No Match")
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
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.
Hi @Anonymous
This Match would work fine but my issue is that every line is different. For example, below are some examples of what i am seeing in my TranGLC_GLAcctContext column, the highlighted portion are customer names that I want to extract from that field and then match up with a corresponding customer name on my "Customer" table. For example that first line would extract the "GUNARAMA WHOLESALE, INC" then match it up to my "Customer" table and spit out a column with any matching customer names.
Within excel I was able to do this by using this logic:
INDEX('Customer'!$A$2:$A$2020,MATCH(TRUE,ISNUMBER(SEARCH('Customer'!$A$2:$A$2020,Table1[TranGLC_GLAcctContext]])),0))
I would like to basically recreate this logic with a DAX measure.
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 if you please read my question carefully and answer my questions, it will be helpful. Thank you! 🙂
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@parry2k Sorry about that. The Data table is 602,000 rows and the Customer table is 45,000 rows of unique customers
@nmoriello ok, what is the end goal? How big is your data table and customer table in terms of rows?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
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.
@nmoriello is this a standard pattern where the customer name is always after the number? If that is the case you can extract customer name in Power Query which will simplify the solution but only if there is a set pattern.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@parry2k ,
No, unfortunatelyit is not a pattern, there is always an instance of the Customer Name, but the characters before it are not standarized.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 75 | |
| 36 | |
| 31 | |
| 29 | |
| 26 |