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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Extract text after delimiter using DAX

Hi everyone, I am trying to write a DAX code to extract the text after delimitter. 
Example Dataset: 

Charge CodeExpected Output
AON05-0009-EIEI
AON008-SS
BT01-0002-ELEL

 

 

Phase = 
RIGHT(
    'Table'[Charge Code], 
    SEARCH("-",'Table'[Charge Code],)-4)

 

I tried to use the above code but it does not work fine. Can anyone please help me to extract the text after the second delimited using DAX? 

I also tried using PowerQuery but when I give condition to skip first delimitter, I am getting blanks for a few chargecodes (for ex: AON008-S in the data above)

Somebody please help me out with this problem. Thank you in advance! 

1 ACCEPTED SOLUTION
coskuersanli
Resolver III
Resolver III

Hi @Anonymous 

 

In Power Query, you have an option to split at right most delimiter. Would it solve your problem?

 

coskuersanli_0-1660633743786.png

 

View solution in original post

2 REPLIES 2
coskuersanli
Resolver III
Resolver III

Hi @Anonymous 

 

In Power Query, you have an option to split at right most delimiter. Would it solve your problem?

 

coskuersanli_0-1660633743786.png

 

Anonymous
Not applicable

Hi @coskuersanli  thanks this worked!! I was not aware of this function. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.