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
mkpado
Helper I
Helper I

Remove or Rename Data Field in Excel Query

I am currently running into a query error whenever I need to remove or rename a a data feild in the source Excel file that I am querying from Power BI Desktop. For Example: 

 

I create a query between Power BI and an Excel file "Table 1" with 3 data feilds "Field 1", "Field 2" and "Field 3".

If I want to remove a data field - i.e. delete "Field 2" from the source file ("Table 1") I recive an error when I try to refresh the query. Furthermore, if I remane a field (e.g. "Field 2" to "Field 4") I also recive an error when I try to refresh the query. 

 

From what I can tell the query is looking for the deleted or renamed data field and when it cant find the data field it throws back an error. Is there any querying method that allows the freedom to remove and / or rename data fields in a source file without breaking the original query?

 

Any help would be greatly appreciated. Thank you!

 

1 ACCEPTED SOLUTION
MarcelBeug
Community Champion
Community Champion

Depending on your query code, you may use parameter missingField, with available values and applicable functions below:

 

missingField Values.pngmissingField.png

 

 

Specializing in Power Query Formula Language (M)

View solution in original post

1 REPLY 1
MarcelBeug
Community Champion
Community Champion

Depending on your query code, you may use parameter missingField, with available values and applicable functions below:

 

missingField Values.pngmissingField.png

 

 

Specializing in Power Query Formula Language (M)

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.