The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
Solved! Go to Solution.
or
Column =
VAR __t = SEARCH(" Benchmark",[Column1],1,0)-1
RETURN
LEFT([Column1],__t)
or
Column =
VAR __t = SEARCH(" Benchmark",[Column1],1,0)-1
RETURN
LEFT([Column1],__t)
pls try this
Column =
VAR __t = SUBSTITUTE('Table'[Column1]," Benchmark","|")
RETURN
TRIM(PATHITEM(__t,1,TEXT))