Forum Discussion

SgCC's avatar
SgCC
New Member
11 months ago
Solved

Embedded code for web issue

Visual don't show in preview of embed code and also once the HTML /link is open. 

All admin setting are correct. both visuals incl. calculations (DAX code)

 

 

  • Hi SgCC

     

    That is helpful, thanks. You are getting a PowerBIAnonymousArbitraryDaxExpressionException error. 

    This error usually means you used a public “Publish to web” embed code and the report contains something anonymous viewers aren’t allowed to run - most often report-level DAX measures (thin report measures) or other features that force the service to execute “arbitrary” DAX for an anonymous user. Publish to web blocks those.

    Publish to web from Power BI - Power BI | Microsoft Learn

    Some ideas to fix it: 

    • If you need the page to be public: remove report-level measures from the report and put them into the underlying dataset, then republish. Also make sure the report is Import (not DirectQuery/Live) and isn’t using a shared model from another workspace- all of these are unsupported for Publish to web.

    • If you can require sign-in: switch to Embed report -> Website or portal (secure embed) or publish an app. Secure embed respects dataset measures, RLS, etc., and doesn’t have the Publish-to-web limitations. Microsoft Learn

    • If this is for external, unauthenticated users but you need full features: use Power BI Embedded (app owns data) and render with an embed token instead of a public link. Microsoft Learn 

     

    If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

6 Replies

  • Hi SgCC

     

    What is the error message that the visuals are giving? 

     

    If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution. 

    • SgCC's avatar
      SgCC
      New Member

      Hi tayloramy 

      the message is vague, it said "issue with the connection" - however internet is working... so I am not sure which setting i need to check still.

       

      • tayloramy's avatar
        tayloramy
        Super User

        Hi SgCC
        If you click the blue details link, it should gtive you more information. 

         

        If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution. 

  • thank you so much, this was indeed information I couldn't find, but it does explain the issues.