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.
Hi Everyone,
I have a question on DAX formula which allows me to iterate over a column in one table and perform a concatnate action on another column if the value exsists in that column.
Example
I Have tableA as shown below
| PathUsername |
| A001@test.net|B001@test.net|C001@test.net |
| A001@test.net|B001@test.net|C001@test.net|D001@test.net |
(Image view so the columns are shown properly)
I Also have tableB as shown below
| SearchString | AddString |
| D001@test.net | E001@test.net |
| C001@test.net | F001@test.net |
(Image view so the columns are shown properly)
What I'm trying to do is check if the each values in "SearchString" of tableB is in every row of "PathUsername" of tableA and if yes then concatnate the value of "AddString" corresponding to that "SearchString" from tableB to "PathUsername" of tableA as below
| PathUsername | ProxyUsername |
| A001@test.net|B001@test.net|C001@test.net | A001@test.net|B001@test.net|C001@test.net|F001@test.net |
| A001@test.net|B001@test.net|C001@test.net|D001@test.net | A001@test.net|B001@test.net|C001@test.net|D001@test.net|E001@test.net|F001@test.net |
(Image view below so the columns are shown properly)
If you notice, if there are multiple values it also needs to be concatnated(row two of above table includes the add string of C001 and also D001)
Kindly advise how I can acheive this in DAX thank you.
Solved! Go to Solution.
@Anonymous , Try like
concatenatex(filter(tableB, containsstring(tableA[PathUsername], tableB[SearchString])),tableB[AddString],"|")
You may use this approach.
ProxyUserName =
tableA[PathUsername]
& CONCATENATEX (
tableB,
IF (
NOT (
ISBLANK ( SEARCH ( tableB[SearchString], tableA[PathUsername], 1, BLANK () ) )
),
tableB[AddString],
BLANK ()
),
"|"
)You will have to slightly modify the code to ensure that blanks and delimiters are added correctly.
@amitchandak @Anonymous Thank you very much both the solution works with a little bit tweeking. Really appriciate your help.
You may use this approach.
ProxyUserName =
tableA[PathUsername]
& CONCATENATEX (
tableB,
IF (
NOT (
ISBLANK ( SEARCH ( tableB[SearchString], tableA[PathUsername], 1, BLANK () ) )
),
tableB[AddString],
BLANK ()
),
"|"
)You will have to slightly modify the code to ensure that blanks and delimiters are added correctly.
I didn't knew that DAX has a function called CONTAINSSTRING. I just checked and found that there are few CONTAINS functions like CONTAINS, CONTAINSROW, CONTAINSTRING, CONTAINSTRINGEXACT, PATHCONTAINS.
Are these new functions added recently?
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 79 | |
| 38 | |
| 31 | |
| 27 | |
| 27 |