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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
juhoneyighot
Helper III
Helper III

Need help on DAX to extract a character between delimeter

Hello. PBIX file is in Direct Query. Please see table below. I have a Phase Column. What I want is the Phase2 Column. We will get Phase2 column for this condition:

If Phase= blank then blank 

else

extract Phase2 characters after the last _ in Phase Column.

stx_jobtype_txtNC.INPhasePhase2
NC 110_Estimates__90CompleteNCNC 110_EstimatesEstimates
IN 610_CO EQ_Estimate__90CompleteININ 610_CO EQ_EstimateEstimate
NC.IN 720_Dehu_Estimate__40Contract ExecutedNC.INNC.IN 720_Dehu_EstimateEstimate
012 Service_Service Call   
NC 120_Rough Builder Walk__90CompleteNCNC 120_Rough Builder WalkRough Builder Walk
IN 642_CO Duct_Builder_Walk__90CompleteININ 642_CO Duct_Builder_WalkWalk

 

Thank you.

1 ACCEPTED SOLUTION

@Ahmedx 

it works with this formula without the var

Phase3 =
IF(NOT ISBLANK ('stx__legacy_fsjob'[Phase]),PATHITEMREVERSE(SUBSTITUTE('stx__legacy_fsjob'[Phase],"_","|"),1))

View solution in original post

3 REPLIES 3
Ahmedx
Super User
Super User

pls try this

Screenshot_5.png

@Ahmedx 

it works with this formula without the var

Phase3 =
IF(NOT ISBLANK ('stx__legacy_fsjob'[Phase]),PATHITEMREVERSE(SUBSTITUTE('stx__legacy_fsjob'[Phase],"_","|"),1))

@Ahmedx 

If Phase column is a measure would it affect the formula. I entered the formula above but this error occurs.

juhoneyighot_0-1700582609056.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.