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

Get value after delimiter in dax

Hi,

 

I only need number in the end.

e.g. 002

 

pls not hoping using Right/Left function since values have sometime 3 digits or 4 digits dynamically. 

 

jeongkim_0-1754458515528.png

 

2 ACCEPTED SOLUTIONS
Ritaf1983
Super User
Super User

Hi @Anonymous 
You can use formula like 

Number_After_Underscore =
VAR TextValue = 'Table'[PO#]
VAR UnderscorePosition = SEARCH("_", TextValue, 1, LEN(TextValue))
RETURN
    MID(TextValue, UnderscorePosition + 1, LEN(TextValue))
Ritaf1983_0-1754459081907.png

The pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

MohamedFowzan1
Solution Specialist
Solution Specialist

Hi @Anonymous 

Sample Table:

MohamedFowzan1_1-1754459520532.png

 


You could do this by finding the position of the "_"

NumberSuffix = 
VAR text1 = Pos[Pos]
VAR pos = SEARCH("_", text1, , -1)    
RETURN
    MID(text1, pos + 1, LEN(text1) - pos)

Sample Output:

MohamedFowzan1_0-1754459462751.png

If Resolved, Mark as Solution to guide Others!

View solution in original post

2 REPLIES 2
MohamedFowzan1
Solution Specialist
Solution Specialist

Hi @Anonymous 

Sample Table:

MohamedFowzan1_1-1754459520532.png

 


You could do this by finding the position of the "_"

NumberSuffix = 
VAR text1 = Pos[Pos]
VAR pos = SEARCH("_", text1, , -1)    
RETURN
    MID(text1, pos + 1, LEN(text1) - pos)

Sample Output:

MohamedFowzan1_0-1754459462751.png

If Resolved, Mark as Solution to guide Others!
Ritaf1983
Super User
Super User

Hi @Anonymous 
You can use formula like 

Number_After_Underscore =
VAR TextValue = 'Table'[PO#]
VAR UnderscorePosition = SEARCH("_", TextValue, 1, LEN(TextValue))
RETURN
    MID(TextValue, UnderscorePosition + 1, LEN(TextValue))
Ritaf1983_0-1754459081907.png

The pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Kudoed Authors