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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
pawelj795
Post Prodigy
Post Prodigy

Find value in column

Hi, 
I have column like below.
image.png

I want to find customer number (e.g.39965929 -> in above example).

How to do this?

Maybe use FIND() function?

5 REPLIES 5
amitchandak
Super User
Super User

@amitchandak 

Ok, but I need to find value between fourth and fifth space.


How to do this?

Hi @pawelj795 ,

 

You need a calculated column as below:

 

Column = 
var a = SEARCH(" ",'Table'[Column1])
var b = SEARCH(" ",'Table'[Column1],a+1)
var c = SEARCH(" ",'Table'[Column1],b+1)
var d =SEARCH(" ",'Table'[Column1],c+1)
var e =SEARCH(" ",'Table'[Column1],d+1)
Return
MID('Table'[Column1],d+1,e-d)

 

 

And you will see:

Annotation 2020-01-31 154236.png

 

For the related .pbix file,pls click here.

 

 
Best Regards,
Kelly

@v-kelly-msft 

It's not working in my file, I really don't know why ..
image.png

@v-kelly-msft 

I think I know what creating problem.

I have some rows without 5th space.

Is there any solution to get round this?
image.png

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.