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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rsmhema1993
Frequent Visitor

Is it Possible to add some more column into an existing visual after the dashboard published to app

Hi Everyone,

 

I integrated my dashboard into an app using Power BI Embedded method. My doubt is, Can i able to add some more fields to the existing visual after integrating into an app?

dataset.PNG

May i get this field option into that app for adding some more column for existing visual? Is this option is possible?

 

Thanks in advance.

1 ACCEPTED SOLUTION
Eric_Zhang
Employee
Employee

@rsmhema1993

You can edit the reports in Power BI Embedded. Just check below demo, copy and paste the code in a .html file and run it in Chrome. See more demos here.

 

<html>

 <script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/jquery/dist/jquery.js"></script>

<script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/powerbi-client/dist/powerbi.js"></script>
 
<script type="text/javascript">
window.onload = function () {  
 
// Read embed application token from textbox
var txtAccessToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZXIiOiIwLjIuMCIsIndjbiI6IlBvd2VyQmlBenVyZVNhbXBsZXMiLCJ3aWQiOiJmODFjMTk2Ni1lZGVlLTQxMWItOGY4YS1mODQ0NjAxOWIwNDQiLCJyaWQiOiJjNTJhZjhhYi0wNDY4LTQxNjUtOTJhZi1kYzM5ODU4ZDY2YWQiLCJpc3MiOiJQb3dlckJJU0RLIiwiYXVkIjoiaHR0cHM6Ly9hbmFseXNpcy53aW5kb3dzLm5ldC9wb3dlcmJpL2FwaSIsImV4cCI6MTg5MzQ0ODgwMCwibmJmIjoxNDgxMDM3MTY5fQ.m4SwqmRWA9rJgfl72lEQ_G-Ijpw9Up5YwmBOfXi00YU';
 
// Read embed URL from textbox
var txtEmbedUrl = 'https://embedded.powerbi.com/appTokenReportEmbed?reportId=c52af8ab-0468-4165-92af-dc39858d66ad';
 
// Read report Id from textbox
var txtEmbedReportId = 'c52af8ab-0468-4165-92af-dc39858d66ad';
 
// Get models. models contains enums that can be used.
var models = window['powerbi-client'].models;
 
// Embed configuration used to describe the what and how to embed.
// This object is used when calling powerbi.embed.
// This also includes settings and options such as filters.
// You can find more information at https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details.
var config= {
    type: 'report',
    accessToken: txtAccessToken,
    embedUrl: txtEmbedUrl,
    id: txtEmbedReportId,
    permissions: models.Permissions.All /*gives maximum permissions*/,
    viewMode: models.ViewMode.Edit,
    settings: {
        filterPaneEnabled: true,
        navContentPaneEnabled: true
    }
};
 
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
 
// Embed the report and display it within the div container.
var report = powerbi.embed(reportContainer, config);
 
// Report.off removes a given event handler if it exists.
report.off("loaded");
 
// Report.on will add an event handler which prints to Log window.
report.on("loaded", function() {
    Log.logText("Loaded");
});
 
report.off("error");
report.on("error", function(event) {
    Log.log(event.detail);
});
 
report.off("saved");
report.on("saved", function(event) {
    Log.log(event.detail);
    if(event.detail.saveAs) {
      Log.logText('In order to interact with the new report, create a new token and load the new report');
    }
});
 
}
</script>

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

</html>

View solution in original post

4 REPLIES 4
Eric_Zhang
Employee
Employee

@rsmhema1993

You can edit the reports in Power BI Embedded. Just check below demo, copy and paste the code in a .html file and run it in Chrome. See more demos here.

 

<html>

 <script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/jquery/dist/jquery.js"></script>

<script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/powerbi-client/dist/powerbi.js"></script>
 
<script type="text/javascript">
window.onload = function () {  
 
// Read embed application token from textbox
var txtAccessToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZXIiOiIwLjIuMCIsIndjbiI6IlBvd2VyQmlBenVyZVNhbXBsZXMiLCJ3aWQiOiJmODFjMTk2Ni1lZGVlLTQxMWItOGY4YS1mODQ0NjAxOWIwNDQiLCJyaWQiOiJjNTJhZjhhYi0wNDY4LTQxNjUtOTJhZi1kYzM5ODU4ZDY2YWQiLCJpc3MiOiJQb3dlckJJU0RLIiwiYXVkIjoiaHR0cHM6Ly9hbmFseXNpcy53aW5kb3dzLm5ldC9wb3dlcmJpL2FwaSIsImV4cCI6MTg5MzQ0ODgwMCwibmJmIjoxNDgxMDM3MTY5fQ.m4SwqmRWA9rJgfl72lEQ_G-Ijpw9Up5YwmBOfXi00YU';
 
// Read embed URL from textbox
var txtEmbedUrl = 'https://embedded.powerbi.com/appTokenReportEmbed?reportId=c52af8ab-0468-4165-92af-dc39858d66ad';
 
// Read report Id from textbox
var txtEmbedReportId = 'c52af8ab-0468-4165-92af-dc39858d66ad';
 
// Get models. models contains enums that can be used.
var models = window['powerbi-client'].models;
 
// Embed configuration used to describe the what and how to embed.
// This object is used when calling powerbi.embed.
// This also includes settings and options such as filters.
// You can find more information at https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details.
var config= {
    type: 'report',
    accessToken: txtAccessToken,
    embedUrl: txtEmbedUrl,
    id: txtEmbedReportId,
    permissions: models.Permissions.All /*gives maximum permissions*/,
    viewMode: models.ViewMode.Edit,
    settings: {
        filterPaneEnabled: true,
        navContentPaneEnabled: true
    }
};
 
// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
 
// Embed the report and display it within the div container.
var report = powerbi.embed(reportContainer, config);
 
// Report.off removes a given event handler if it exists.
report.off("loaded");
 
// Report.on will add an event handler which prints to Log window.
report.on("loaded", function() {
    Log.logText("Loaded");
});
 
report.off("error");
report.on("error", function(event) {
    Log.log(event.detail);
});
 
report.off("saved");
report.on("saved", function(event) {
    Log.log(event.detail);
    if(event.detail.saveAs) {
      Log.logText('In order to interact with the new report, create a new token and load the new report');
    }
});
 
}
</script>

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

</html>

@Eric_Zhang Is this Possible for both Direct Query & Import data right?


@rsmhema1993 wrote:

@Eric_Zhang Is this Possible for both Direct Query & Import data right?


@rsmhema1993

Yes, for both.

@Eric_Zhang Thanks for your reply. Smiley Very Happy

 

Now I can able to edit my dashboard.Smiley Happy

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Kudoed Authors