Power BI reports can be added to Synthesis Project Profiles to display data relevant to the project displayed. This can be used to provide users real-time performance metrics - like budget, schedule, and risk - without leaving the project profile page or manually selecting filters.
This documentation is written specifically for Power BI experts who are familiar with building reports, managing data models, and configuring report access. It assumes a working knowledge of Power BI’s embedding options, URL filtering syntax, and best practices for structuring report fields. The instructions focus on integrating Power BI reports into Synthesis Project Profiles using dynamic filters, and are intended for users comfortable with both Power BI and basic web development concepts.
PowerBI Report Considerations
To enable Synthesis to display your Power BI report filtered by the current project, the first step is to build a Power BI Report that includes a Project Number field that can be filtered to display the report details for a specific project.
Canvas Recommendations
- Set the canvas width to 750px wide to match the Synthesis Project Profile page left column width.
- Set the canvas height to match the Synthesis embed block height.
Dataset
- Use a URL friendly field name for Project Number - we recommend using ‘ProjectNumber’.
- Avoid spaces or special characters in the Project Number field name (e.g., use ProjectNumber instead of ‘Project Number’ or ‘Project#’).
- Ensure the project numbers in your dataset exactly match project numbers in Synthesis.
Obtaining a PowerBI Embed URL
Power BI offers two main ways to embed reports into other applications or websites: Secure Embedding and Public Embedding. Each serves a different purpose and has different access controls.
Secure Embedding (Recommended)
Secure embedding is used when you want to embed a report that requires authentication. This requires that each user have a PowerBI license and the report is shared with all users. Users must be signed in to Power BI and have the appropriate permissions to view the report, which PowerBI will prompt the user to do if required.
How to get the link:
- Open your report in the Power BI Service.
- Click on File > Embed report > Website or portal.
- Copy the secure embed URL provided.
Public Embedding
Alternatively, public embedding allows you to share a report without requiring users to sign-in. This also bypasses the requirements for additional PowerBI licenses. You may need to request that this feature be enabled by your IT Group - by default it is disabled.
How to get the link:
- Open your report in the Power BI Service.
- Click on File > Embed report > Publish to web (public).
- Confirm the warning and copy the public URL.
Once you have the PowerBI Embed URL, paste into a text editor for the next step.
Building a Project Profile Embed Code
Synthesis exposes project-specific data through the Document Object Model (DOM) via page attributes. The DOM provides access to structured HTML elements on a profile page (i.e. projectNumber) using standardized data-kafieldname attributes. By querying these attributes on the Project Profile page, the current project’s parameters can be passed into a Power BI report as a filter. See the Querying Synthesis Profile Data and About Document Object Model KB articles for more information.
The following embed code template will pass the Project Number from the Project Profile page to a PowerBI report as a filter.
- Copy and paste the following embed code template into a text editor of your choice:
|
<!-- Dynamic Power BI report in Synthesis Project Profiles --> <div id="powerbi-container"> <p>Loading report...</p> </div> <script> // Step 1: Try to find the element that contains the project number var userQuery = document.querySelector('[data-kafieldname="projectNumber"]'); if (userQuery !== undefined && userQuery !== null) { // Step 2: Extract the text content and trim any extra whitespace var projectNumber = userQuery.textContent.trim(); // Step 3: Encode the filter for use in a URL var encodedFilter = encodeURIComponent("Sheet1/ProjectNumber eq '" + projectNumber + "'"); // Step 4: Construct the full Power BI embed URL with the filter var embedUrl = "https://app.powerbi.com/reportEmbed?reportId=f30b8284-b226-4b2c-8459-9c9cb0ca8ca7&autoAuth=true&navContentPaneEnabled=false&ctid=218ebfb5-50d0-4d98-aca4-7ead6a48c5b3" + "&filter=" + encodedFilter; // Step 5: Create the iframe element var iframe = document.createElement("iframe"); iframe.title = "Project Performance Report"; iframe.width = "750"; iframe.height = "550"; iframe.src = embedUrl; iframe.frameBorder = "0"; iframe.allowFullscreen = true; // Step 6: Replace the placeholder with the iframe var container = document.getElementById("powerbi-container"); container.innerHTML = ""; // Clear loading message container.appendChild(iframe); } else { // If the project number is not found, show an error message document.getElementById("powerbi-container").innerHTML = "<p>Project number not found on this page.</p>"; } </script> |
- Update the encodedFilter field name to the Table/FieldName used in your PowerBI report for ProjectNumber.
- Update the embedURL to include the embed URL for your report:
- Update iframe variables:
- iframe.title - title of your report (optional)
- iframe.width - Height in pixels of your report canvas
- iframe.height - Width in pixels of your report canvas
- Save your embed code locally.
Adding the PowerBI Report Embed Code to Synthesis Project Profiles
- Open your Synthesis intranet.
- Browse to the Project Directory.
- Open any project.
- Click the Edit Pencil in the upper right corner and select Edit Global Web Layout.
- Place your cursor where you would like to insert the PowerBI Report.
- Click Insert > Embed Code
- On the ‘Insert Embed Code’ modal, click the Use Custom Code tab.
- Paste the finished embed code.
- Click Insert.
- Publish the page.