Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
ak77
Post Patron
Post Patron

DAX to extract all the characters after a particular STRING

Hi All ,

 

is there a DAX formula to get all the characters before a particular string? please let me know

 

For Ex: in the below string i need to extract words before Benchmark

TOTAL EQUITY Benchmark
PRIVATE EQUITY  Benchmark
EMERGING POOL Benchmark 

 

Output:

TOTAL EQUITY
PRIVATE EQUITY
EMERGING POOL

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

or

Column = 
VAR __t = SEARCH(" Benchmark",[Column1],1,0)-1
RETURN
LEFT([Column1],__t)

Screenshot_2.png

View solution in original post

3 REPLIES 3
ak77
Post Patron
Post Patron

@Ahmedx Thanks !. perfect solution.

Ahmedx
Super User
Super User

or

Column = 
VAR __t = SEARCH(" Benchmark",[Column1],1,0)-1
RETURN
LEFT([Column1],__t)

Screenshot_2.png

Ahmedx
Super User
Super User

pls try this

Column = 
VAR __t = SUBSTITUTE('Table'[Column1]," Benchmark","|")
RETURN
TRIM(PATHITEM(__t,1,TEXT))

Screenshot_1.png

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors