Forum Discussion
Python Visual rendering issue on .Net wrapper
- 7 months ago
Python (and R) visuals are not supported in embedded scenarios. They render in Desktop (and sometimes in the Service UI), but when you host the report inside a .NET “wrapper” (Power BI Embedded / iframe / app owns data), the Service will not execute that Python script for security/runtime reasons — so the visual fails. That’s expected behavior, not a bug you can fix with settings.
What to do instead :
1. Precompute + slice
If you can reduce the degrees of freedom, precompute summaries at a reasonable grain (e.g., Country × BU × Dept × Event) and let the report filter those results. You don’t need “every permutation”, just the combinations your business actually uses.
2. Move summarization outside Power BI
Keep the report interactive, but do the summarization in an external service:
Send current filter context (selected values) to an API
API returns the summary text
Display it in Power BI using a custom visual (HTML/React) or a Power BI visual that can call an endpoint
This is the only way to keep “any combination of slicers” dynamic in embedded.
3. Use a Text Analytics pipeline upstream
If you’re on Fabric / Azure, you can store embeddings/topics or “key phrases” per comment and summarize based on filtered retrieval (much lighter than re-summarizing raw text every time). The report then aggregates precomputed signals.
4. If you must stay purely in Power BI Embedded
Then you cannot use Python/R visuals. You’ll need to replace the Python visual with:
a standard visual based on precomputed tables, or
a certified custom visual that doesn’t require Python execution in the client.