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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

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
v-caliao-msft
Microsoft Employee
Microsoft Employee

@Anonymous,

 

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
v-caliao-msft
Microsoft Employee
Microsoft Employee

@Anonymous,

 

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

 

Anonymous
Not applicable

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

haozhong
Resolver I
Resolver I

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>]]) 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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 Solution Authors
Top Kudoed Authors