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
johnyip
Super User
Super User

Error occurred in appending a SQL table with an excel file

I tried to append (or in SQL language, union) two data sources, one of them is from Azure database and another is simply an Excel file.

 

Everything works fine when I was preparing the steps in Power Query, but when I pressed close and apply, this error occurs:

 

Failed to save modifications to the server. Error returned: 'The search Text provided to function 'FIND' could not be found in given text. The current operation was cancelled because another operation in the transaction failed. '

johnyip_0-1671756809664.png

 

The M script used is like the below:

The commented part is literally the definition of "Adjustment" table, it was there becasue I tried to fix the error by internalizing the adjustment table into the M script and then use that outcome to invoke Table.Combine, but in vain.

johnyip_1-1671757001995.png

 

As shown, there is  no syntax error. When I pressed done, the preview can load, but if I press "Close & Apply "afterwards, shortly the said error message pops up.

 



Please mark my post as the solution if this answers your question!
Appreciate your Kudos !!
1 ACCEPTED SOLUTION
johnyip
Super User
Super User

Hi all,

I found the cause. That is because of some human errors in the data preparation steps I have made for the Excel data source.

 

I made one silly mistake by defining "YYYYMM" in the Excel source, while the original table's column is "YYYY MMM". I just changed the Excel source's custom column from showing "YYYYMM" to "YYYY MMM", and then everything works.

So, I think this error can be caused by data format inconsistency, when you have used FIND() in DAX (specifically, you can search for " " in "2022 Jan", but not in "202201". This is what I observed.).

 

Hope anyone who encountered the same problem and read this post can be assisted.



Please mark my post as the solution if this answers your question!
Appreciate your Kudos !!

View solution in original post

1 REPLY 1
johnyip
Super User
Super User

Hi all,

I found the cause. That is because of some human errors in the data preparation steps I have made for the Excel data source.

 

I made one silly mistake by defining "YYYYMM" in the Excel source, while the original table's column is "YYYY MMM". I just changed the Excel source's custom column from showing "YYYYMM" to "YYYY MMM", and then everything works.

So, I think this error can be caused by data format inconsistency, when you have used FIND() in DAX (specifically, you can search for " " in "2022 Jan", but not in "202201". This is what I observed.).

 

Hope anyone who encountered the same problem and read this post can be assisted.



Please mark my post as the solution if this answers your question!
Appreciate your Kudos !!

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.