cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Zuzana Advocate I
Advocate I

error in "FIND" function

Hi,

 

I'm having issues with text funciton "find".

I use it to partition string into columns (to create table with couple of additions later)

 

  

The expression is Pandl_key2 = ADDCOLUMNS( SUMMARIZE(data;[pandl]);
                                                                                      "test";FIND("-";[pandl];1)+4
                                                                                       )

 

I'm getting error "The search Text provided to function 'FIND' could not be found in the given text."

I'm sure, the "-" mark is in my text, I used same expression before on same dataset and it was working.

 

Thanks for any ideas,

Zuzana

 

pbi find error.png

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft v-caliao-msft
Microsoft

Re: error in "FIND" function

@Zuzana,

 

Please try the expression below
Pandl_key2 = ADDCOLUMNS( SUMMARIZE(data;[pandl]);"test";IF(ISERROR(FIND("-";[pandl];1)),BLAKN(),FIND("-";[pandl];1))+4)

Capture.PNGCapture1.PNG

 

Regards,

Chalrie Liao

 

View solution in original post

3 REPLIES 3
haozhong Resolver I
Resolver I

Re: error in "FIND" function

Are you trying to find the starting position of the "-" and then plus 4?

 

So if it's 10-100-600331, the answer you will get is 3+4 = 7?

 

Try this:- 

 

Pandl_key2 = FIND("-",[pandl],1)+4

 

 

Find Syntax is:-

 

FIND(<find_text>, <within_text>[, [<start_num>][, <NotFoundValue>]]) 
Microsoft v-caliao-msft
Microsoft

Re: error in "FIND" function

@Zuzana,

 

Please try the expression below
Pandl_key2 = ADDCOLUMNS( SUMMARIZE(data;[pandl]);"test";IF(ISERROR(FIND("-";[pandl];1)),BLAKN(),FIND("-";[pandl];1))+4)

Capture.PNGCapture1.PNG

 

Regards,

Chalrie Liao

 

View solution in original post

Zuzana Advocate I
Advocate I

Re: error in "FIND" function

Hi Charlie, 

 

thanks for your answer.. it worked well.

I found that there were some blank values, which probably caused this troubles. Your solution can fix this.

 

Best regards 🙂

Zuzana

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors