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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Sar_Aan
Regular Visitor

How to get the text between delimiters of a long text using dax?

I have a text like this /sfdfsfdf/dsadsaa3-4rwer-34rwerfw-234-3423-efwfdsdf/rweerfdfsd/sdfsd-fsdfsdf-fsds-dfsdv-fsvsfvsvs-svfsvsv-1/sdvsvds/microsoft.compute/virtualmachines/fdadfadf434 where I have to extract only "virtual machines" using dax (not m code). How can I do that?

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

pls try this

Column = 

VAR _Patch = SUBSTITUTE([Data],"/","|")
VAR _LenPatch = PATHLENGTH(_Patch)
VAR _Result = PATHITEM(_Patch,_LenPatch-1)
RETURN
_Result

Screenshot_2.png

View solution in original post

3 REPLIES 3
Ahmedx
Super User
Super User

pls try this

Column = 

VAR _Patch = SUBSTITUTE([Data],"/","|")
VAR _LenPatch = PATHLENGTH(_Patch)
VAR _Result = PATHITEM(_Patch,_LenPatch-1)
RETURN
_Result

Screenshot_2.png

Thank you very much. This worked

Idrissshatila
Super User
Super User

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.