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 want to split one column based on another column. In other words, I want to subtract the string of another column from the current column.
I'm looking for a DAX or PQ formula to reach to Result column by splitting the Name column based on Subcategory Column.
Please check the sample dataset below:
The current stat:
| Subcategory | Name |
| Courts | SCHOOL PARK COURT |
| Playgrounds | MEMORIAL ELEMENTARY PLAYGROUNDS |
The Result:
| Subcategory | Name | Result |
| Courts | SCHOOL PARK COURT | SCHOOL PARK |
| Playgrounds | MEMORIAL ELEMENTARY PLAYGROUNDS | MEMORIAL ELEMENTARY |
Solved! Go to Solution.
Hi @Arman_And ,
You could try this:-
Column =
VAR _found =
FIND ( UPPER ( 'Table'[Subcategory] ), UPPER ( 'Table'[Name] ), 1, 0 )
RETURN
TRIM (
REPLACE ( UPPER ( 'Table'[Name] ), _found, LEN ( 'Table'[Subcategory] ), "" )
)
Output;-
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @Arman_And ,
You could try this:-
Column =
VAR _found =
FIND ( UPPER ( 'Table'[Subcategory] ), UPPER ( 'Table'[Name] ), 1, 0 )
RETURN
TRIM (
REPLACE ( UPPER ( 'Table'[Name] ), _found, LEN ( 'Table'[Subcategory] ), "" )
)
Output;-
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
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 |
|---|---|
| 76 | |
| 37 | |
| 31 | |
| 27 | |
| 27 |