How can you customize the toolbar and add buttons in Power BI embedded reports

0 votes
How can you customize the toolbar and add buttons in Power BI embedded reports?

I’m working on a Power BI Embedded project and need to customize the toolbar to add specific buttons or functionality that align with our business needs. What options and methods are available to achieve this customization, and how can they be implemented while ensuring a smooth user experience?
Dec 18, 2024 in Power BI by Evanjalin
• 19,330 points
103 views

1 answer to this question.

0 votes

To customize the toolbar and add buttons in Power BI Embedded, follow these steps:

  1. Embed the Report: Use the Power BI JavaScript API to embed the report in your app.

var embedConfig = { 

type: 'report', 

tokenType: powerbi.models.TokenType.Embed, 

accessToken: '<Embed Token>',

embedUrl: '<Embed URL>',

 id: '<Report ID>',

settings: { filterPaneEnabled: false, navContentPaneEnabled: false }

 };

var report = powerbi.embed(document.getElementById('reportContainer'), embedConfig);

Customize the Toolbar: Hide default buttons by configuring the settings property and add custom buttons outside the report. Use custom HTML buttons to trigger actions like filtering or exporting.

<button id="applyFilter">Apply Filter</button>

document.getElementById('applyFilter').addEventListener('click', function() {

var filter = { $schema: "http://powerbi.com/product/schema#basic", target: { table: "Sales", column: "Product" }, operator: "In", values: ["ProductA", "ProductB"] };

 report.updateFilters(powerbi.models.FiltersOperations.Add, [filter]);

 });

Try and optimize: Test buttons or actions to verify their function while ensuring maximum performance; customize the toolbar to ensure clarity and responsiveness.

Such that you will be able to add certain business-specified functionalities while embedding the Power BI reports.

answered Dec 18, 2024 by pooja
• 16,840 points

Related Questions In Power BI

0 votes
0 answers
0 votes
1 answer

How do you add a new filter pane in old Power BI reports?

Answer 1 open the report in power bi ...READ MORE

answered Oct 10, 2023 in Power BI by Monika kale

edited Mar 5 1,518 views
0 votes
1 answer

Displaying Table Schema using Power BI with Azure IoT Hub

Answering your first question, Event Hubs are ...READ MORE

answered Aug 1, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
1,523 views
+1 vote
1 answer

Unable to install connector for Power Bi and PostgreSQL

I think the problem is not at ...READ MORE

answered Aug 22, 2018 in Power BI by nirvana
• 3,130 points
2,870 views
+2 votes
2 answers

Migrate power bi collection to power bi embedded

I agree with Kalgi, this method is ...READ MORE

answered Oct 11, 2018 in Power BI by Hannah
• 18,520 points
1,654 views
+1 vote
1 answer

Connect power bi desktop to dataset and create custom reports

Open power bi report nd sign in ...READ MORE

answered Oct 10, 2023 in Power BI by Monika kale

edited Mar 5 1,800 views
0 votes
0 answers

How can you customize the toolbar and add buttons in Power BI embedded reports?

How can you customize the toolbar and ...READ MORE

Dec 13, 2024 in Power BI by Evanjalin
• 19,330 points
69 views
0 votes
0 answers
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP