Forum Discussion
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 Code | Expected Output |
| AON05-0009-EI | EI |
| AON008-S | S |
| BT01-0002-EL | EL |
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!
Hi Anonymous
In Power Query, you have an option to split at right most delimiter. Would it solve your problem?
2 Replies
- coskuersanliResolver III
Hi Anonymous
In Power Query, you have an option to split at right most delimiter. Would it solve your problem?
- AnonymousNot applicable
Hi coskuersanli thanks this worked!! I was not aware of this function.