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
amaleranda
Post Patron
Post Patron

error when try to apply changes after creating function

Hi Gurus,

 

I have created a table function as below (there are 6 functions)

(Entname as text) as table =>

 

whne I try to apply change it gives me below error. Does anyone have any ideat how avoid that error.

 

FuncrtionError.PNG

 

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @amaleranda ,

 

Try to cancel the relationship between the table where entname is located and other tables, and disable the "enhanced dataset metadata" option. Then execute the custom function for entname in the query editor.

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

12 REPLIES 12
V-lianl-msft
Community Support
Community Support

Hi @amaleranda ,

 

Try to cancel the relationship between the table where entname is located and other tables, and disable the "enhanced dataset metadata" option. Then execute the custom function for entname in the query editor.

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@V-lianl-msft ,

 

I did that then I get the below error.

 

 

FuncrtionError.PNG

@V-lianl-msft ,

 

Below is my PowerQuery. I use this funtion to invoke on a tabel with ServerName and EntName. I am able to invoke the function without any issues but I come across above message when I try to apply changes. I assume its due to the higilited step, but I have no Idea how to remove that step as I need to exand my jason sting.

 

(ServerName as text, EntName as text) as table =>

let
Source = Json.Document(Web.Contents("http://"&ServerName&"/datasnap/rest/TServerMthods1/getClasData/"&EntName&"/GetAVens")),
result = Source[result],
result1 = result{0},
#"Converted to Table" = Table.FromList(result1, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"NUMBER", "CODE", "NAME", "CATEGORY", "TERMS_CODE", "SHIP_CODE", "BILLER_COD", "TAX_CODE", "DISC_CODE", "PERSON_ORD", "PERSON_ACT", "BAL_FWDOPN", "AGE_FISCAL", "CREDIT_LIM", "TOTAL_DUE", "COLLEC_REF", "COLLEC_DAT", "YTD_PURCH", "YTD_DISCTK", "YTD_PAY", "YTD_RETURN", "YTD_DISC", "LST_PURNO", "LST_PURDT", "LST_PAYNO", "LST_PAYDT", "LST_RETNO", "LST_RETDT", "LST_PURAMT", "LST_PAYAMT", "LST_RETAMT", "CREATE_DT", "LST_CHQNO", "DUEDT_CTRL", "DUEDT_DAYS", "TEMP", "YTD_FINCHG", "HIGHST_DUE", "COMMENT", "DISC_DAYS", "PAY_BY", "FORMAT_PAY", "FAX_ACCT", "BANK_NAME", "BSB_NO", "ACCT_NO", "ACCT_NAME", "CHQ_FORMAT", "ORD_FORMAT", "PROD_TYPE", "PP_TYPE", "DAYS_FLOAT", "GL_ACCT", "VC_NUMBER", "CURRENCY", "BRANCH", "PAY_MODE", "PAY_TRANS", "REMITTANCE", "FAX_NUMBER", "VC_NOTES", "SWIFT_CODE"}, {"NUMBER", "CODE", "NAME", "CATEGORY", "TERMS_CODE", "SHIP_CODE", "BILLER_COD", "TAX_CODE", "DISC_CODE", "PERSON_ORD", "PERSON_ACT", "BAL_FWDOPN", "AGE_FISCAL", "CREDIT_LIM", "TOTAL_DUE", "COLLEC_REF", "COLLEC_DAT", "YTD_PURCH", "YTD_DISCTK", "YTD_PAY", "YTD_RETURN", "YTD_DISC", "LST_PURNO", "LST_PURDT", "LST_PAYNO", "LST_PAYDT", "LST_RETNO", "LST_RETDT", "LST_PURAMT", "LST_PAYAMT", "LST_RETAMT", "CREATE_DT", "LST_CHQNO", "DUEDT_CTRL", "DUEDT_DAYS", "TEMP", "YTD_FINCHG", "HIGHST_DUE", "COMMENT", "DISC_DAYS", "PAY_BY", "FORMAT_PAY", "FAX_ACCT", "BANK_NAME", "BSB_NO", "ACCT_NO", "ACCT_NAME", "CHQ_FORMAT", "ORD_FORMAT", "PROD_TYPE", "PP_TYPE", "DAYS_FLOAT", "GL_ACCT", "VC_NUMBER", "CURRENCY", "BRANCH", "PAY_MODE", "PAY_TRANS", "REMITTANCE", "FAX_NUMBER", "VC_NOTES", "SWIFT_CODE"})
in
#"Expanded Column1"

Pragati11
Super User
Super User

Hi @amaleranda ,

 

Please disable "enhanced dataset metadata" option in Power BI.

You can navigate there as follows: File --> Options & Settings --> Options --> Preview Features --> Stored Dataset using Enhanced Metadata Format

 

Then try again your query chnages.

 

Hope this helps.

 

Thanks,

Pragati

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

hi @Pragati11 ,

 

Tanks for the reply. 

 

I do not seem to have that options in my preview feature. I am using May 2020 version. 

 

Thanks

@Pragati11 ,

 

I found it and tick the box. Issue still pressist.

 

 

Hi @amaleranda ,

 

I asked you to DISABLE it not enable 😛

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

@Pragati11 , Silly me 🙂 . I manged to disable it but still getting the error. 

I copied the Powerqury below. FuncrtionError.PNG

Hi @amaleranda ,

 

Didn't understand your power query screesnhot. It's highlighting a BLANK space.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

@Pragati11 , 

 

I wanted to higlited #convert to tabel step.

 

The read scrach is to hide the actual URL as for privacy. Thanks

Hi @amaleranda ,

 

It seems like while converting your list to table there are errors due to NULL values.

Is it possible to share scrresnhot around the data that you are trying to convert to Table.

 

Thanks,

Pragati

 

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

@Pragati11 ,

 

below is the screenshot of datatabel, table get extracted seems like whne I try to trun that into a function it has issues.

 

FuncrtionError.PNG

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.