Forum Discussion

amaleranda's avatar
amaleranda
Post Patron
6 years ago
Solved

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.

 

 

  • 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.

12 Replies

  • 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

     

    • amaleranda's avatar
      amaleranda
      Post Patron

      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

  • V-lianl-msft's avatar
    V-lianl-msft
    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.

      • amaleranda's avatar
        amaleranda
        Post Patron

        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"