Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi, I'm trying to get a click-through working on a dashboard tile.
This is a Power BI Embedded, App-owns-data, scenario, where I'm embedding Power BI visuals (Dashboards and Reports) in a bespoke SharePoint 2013 on-premise site, where external users log in and get access to selected dashboards showing trends etc. on the data in the application.
After a few starts I got the embedding working. (Reason for the initial problems: in the type of SP2013 custom webparts this application is using, it's not possible to use the MS Power BI .NET API (as that's all based on Async/Await patterns which aren't really supported in SharePoint 2013 "classic" webparts, so in the end I'm directly talking to the Power BI REST API, which works fine).
Next thing on the wish-list is to be able to click through the various tiles on a Dashboard, and then replace the embedded Dashboard with the corresponding Report.
I've set up the event handling as described here, (as pointed at by @v-ljerr-msft in the post here), but I'm a bit at a loss on how to proceed.
I have the event.detail.reportEmbedUrl from the tileClicked event. Do I now have to create a new config JSON for the embedded report, with a fresh accessToken for that report (as the token for the embedded Dashboard is for that Dashboard), and then call powerbi.embed(container, config) again for the clicked-through embedded report, or is there a simpler way to get this scenario to work?
My biggest problem is that I cannot easily generate a new accessToken for the report, without going back to the backend (my SharePoint 2013 application), and, unlike "modern" MVC application, it's also not trivial to implement something like a web service (in whichever form) on the platform to call from the page and generate a new accessToken.
Is there anyone who has experience with a similar scenario and is able to help me get this to work?
I'm having the same issue with setting tileClicked events to refresh the div with the corresponding tiles report. Any news on how to fix this issue??
An addition: I'm getting this error with what I tried in my JavaScript:
"SCRIPT5022: Embedding on an existing element with a different type than the previous embed object is not supported. Attempted to embed using config {"type":"report","settings": ... } on element <div id="...>, but the existing element contains an embed of type: undefined which does not match the new type: report
Bestand: powerbi.min.js, regel: 2, kolom: 4457
My JS code:
...
var container = powerbi.embed(powerBIContainer, config);
// container.on will add an event handler which prints to Log window. container.on("tileClicked", function (event) { if (event.detail.reportEmbedUrl) { var url = event.detail.reportEmbedUrl; var reportIdRegEx = /reportId="?([^&]+)"?/; var reportIdMatch = url.match(reportIdRegEx); if (reportIdMatch) { config.embedUrl = event.detail.reportEmbedUrl; config.type = 'report'; config.id = reportIdMatch[1]; container = powerbi.embed(powerBIContainer, config); } } });
Also struggling with this issue. Did you manage to find a solution?
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
7 | |
7 | |
3 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
4 |