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
Cednok
Frequent Visitor

search value and return X character after

Hi the  community 

 

I have one cell like this 

Cednok_0-1617367657786.png

 

i want create new column on my power bi with the reference after MDS = , this reference always contains 6 characters wich dax formule, which dax formula I could use to get this result. Thank you in advance for your help

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi. @Cednok 

In PowerQuery, you can try the feature "Extract".

Add columns->exact->Text Between Delimiters

54.png

In Dax, you can try calculated column as below:

Result = 
VAR location =
    SEARCH ( "=", 'Table'[Text],, 0 )
RETURN
    MID ( 'Table'[Text], location + 1, 6 )

55.png

 

Best Regards,
Community Support Team _ Eason

 

 

View solution in original post

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi. @Cednok 

In PowerQuery, you can try the feature "Extract".

Add columns->exact->Text Between Delimiters

54.png

In Dax, you can try calculated column as below:

Result = 
VAR location =
    SEARCH ( "=", 'Table'[Text],, 0 )
RETURN
    MID ( 'Table'[Text], location + 1, 6 )

55.png

 

Best Regards,
Community Support Team _ Eason

 

 

amitchandak
Super User
Super User

@Cednok , Split in Power Query by "MDS = " into 2 column  -https://www.tutorialgateway.org/how-to-split-columns-in-power-bi/

After in second column use the formula Text.Start([col2], 6)

 

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.