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

Failed to save modifications to the server - custom function

I am receiving a: 

 

"Failed to save modification to the server. Error returned: 'Expressions that yield variant data-type cannot be used to definie calculated columns. OLE DB or ODBC error: [Expression.Error] The field 'registration' of the record wasn't found."

 

The offending query is one that retrieves via HTTP a list of ids, against which I invoke a custom function. The custom function is also an HTTP request, using that id in the URL to retrieve a json formatted table.

 

This is perplexing for a variety of reasons:

 

  • I am not saving anything to a server AFAIK
  • The custom function example doesn't give an error
  • The preview of the final query works
  • There is no calculated column
  • I don't see a 'registration' field (but will look further)

 

Any ideas?

 

-Kevin

 

 

 

 

3 REPLIES 3
v-haibl-msft
Employee
Employee

@PBI_KLo

 

From the error message, we need to check again to see if there is calculated column with wrong data type, and the registration field. It is better to share your PBIX file.

 

Best Regards,

Herbert

Hi Herbert,

 

I found "registration" in the query, and I suspect for some ids there are extra fields with incorrect data types. However, I dont see a calculation. What's the best way to send you the PBIX? Here's the offending query with modifications for privacy.

 

 

 

 

let
Source = Json.Document(Web.Contents("https://foobar.com" & meetingid & "&fromDate=" & "2016-7-1" & "&pagingCriteria.firstResultIndex=" & "0" & "&pagingCriteria.resultCount=" & "500")),
listRegistrationsResult = Source[listRegistrationsResult],
registration = listRegistrationsResult[registration],
#"Converted to Table" = Table.FromList(registration, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"email", "attendance"}, {"email", "attendance"}),
#"Expanded attendance" = Table.ExpandListColumn(#"Expanded Column1", "attendance"),
#"Expanded attendance1" = Table.ExpandRecordColumn(#"Expanded attendance", "attendance", {"entryTime", "exitTime", "durationInMinutes"}, {"entryTime", "exitTime", "durationInMinutes"})
in
#"Expanded attendance1"

 

Thanks

 

-Kevin

@PBI_KLo

 

You can upload your pbix file to online file service like OneDrive and share it to me.

 

Best Regards,

Herbert

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.