Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
marcobaciga
Helper I
Helper I

Put tile in html tag different iframe

Hi,

is it possible put one tile into different tag than iframe? With PowerBI embedded or with PowerBI API?

1 ACCEPTED SOLUTION
Eric_Zhang
Microsoft Employee
Microsoft Employee

@marcobaciga

You can use a DIV, but underlying it sets innerHTML ='<iframe src=....' for the DIV. What is your problem with iframe?

<html>
 <script src="https://microsoft.github.io/PowerBI-JavaScript/demo/bower_components/jquery/dist/jquery.js"></script>  
 <script src="https://microsoft.github.io/PowerBI-JavaScript/demo/bower_components/powerbi-client/dist/powerbi.js"></script>
<script type="text/javascript">
window.onload = function () {
 
var embedConfiguration = {
    type: 'report',
    accessToken: 'ey..your token here..',
    id: 'db..your report id here..',
    embedUrl: 'https://embedded.powerbi.com/appTokenReportEmbed?reportId=your report id here' 
}; 

var $reportContainer = $('#reportContainer'); 
var report = powerbi.embed($reportContainer.get(0), embedConfiguration);   

}
</script>

<div id="reportContainer"></div>

</html> 

 

 

View solution in original post

1 REPLY 1
Eric_Zhang
Microsoft Employee
Microsoft Employee

@marcobaciga

You can use a DIV, but underlying it sets innerHTML ='<iframe src=....' for the DIV. What is your problem with iframe?

<html>
 <script src="https://microsoft.github.io/PowerBI-JavaScript/demo/bower_components/jquery/dist/jquery.js"></script>  
 <script src="https://microsoft.github.io/PowerBI-JavaScript/demo/bower_components/powerbi-client/dist/powerbi.js"></script>
<script type="text/javascript">
window.onload = function () {
 
var embedConfiguration = {
    type: 'report',
    accessToken: 'ey..your token here..',
    id: 'db..your report id here..',
    embedUrl: 'https://embedded.powerbi.com/appTokenReportEmbed?reportId=your report id here' 
}; 

var $reportContainer = $('#reportContainer'); 
var report = powerbi.embed($reportContainer.get(0), embedConfiguration);   

}
</script>

<div id="reportContainer"></div>

</html> 

 

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.