> For the complete documentation index, see [llms.txt](https://docs.pixiebrix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pixiebrix.com/integrations/microsoft/add-a-power-bi-chart-to-the-sidebar.md).

# Add a Power BI chart to the Sidebar

1. Add a new Sidebar Panel mod in the page editor, either using the premade document context panel or creating a new base sidebar panel.<br>

   <figure><img src="/files/xcnYA05WpJBQaY8YLypn" alt=""><figcaption></figcaption></figure>
2. Add the PowerBI Dashboard brick to this mod.<br>

   <figure><img src="/files/lke0H6XlhfLb2f779fsq" alt=""><figcaption></figcaption></figure>
3. Copy the embed from your PowerBI report from outside the editor from file→embed report →website or portal, or in the editor from file→embed. Paste this url in the embedUrl field of the PowerBI Dashboard brick.<br>

   <figure><img src="/files/sGfnbgYA7IX9kDUiDalj" alt=""><figcaption></figcaption></figure>
4. The page should now be embeded into the new sidebar, or into one of the tabs if you have multiple sidebars.<br>
5. If you wish to have this display a specific page of the report copy the report section from the URL when inspecting that page in PowerBI (last part of the URL).

<figure><img src="/files/OZU5Y7OBriBlOIsoaKu6" alt=""><figcaption></figcaption></figure>

6. If you wish to make a separate page in PowerBI that's better scaled to fit in the sidebar, right click the page at the bottom and click duplicate, then you can scale the page through format (paint roller below visualizations on the right) and click page size.<br>

   <figure><img src="/files/4CFNRlA1YIAtIYKkKbyA" alt=""><figcaption></figcaption></figure>
7. To set a filter on the report to default to specific data (or use data on the page to choose what the default is), fill out the filter field with the wanted data/fields, starting with the table the data is from, a '/', the field, an operator (in, eq, and, lt etc), and finally a selector (number or string to filter for). Filters are formatted as: "tableName/field operator selector" or "tableName/field in (selectorOne,selectorTwo,...)" and are case sensitive. Filters can use the operator and to have multiple conditions, or the operator in to use a list of comma separated selectors.\
   \
   Operators and examples from <https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-url-filters><br>

   <figure><img src="/files/X1u8mfQZPPIMR1h076WF" alt=""><figcaption></figcaption></figure>

### Tips/Troubleshooting

* Be sure that the pageName is the report section (including the text "reportsection") and not the name of the page
* Filters require very specific formatting, the external documentation below contains many examples to work from.

### PowerBI filter external documentation

[Power BI RL Filters Tips](https://powerplatformlearn.com/2021/07/24/power-bi-url-filters-tips/)

[Filter a report using query string parameters in the URL - Power BI](https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-url-filters)

[Embed a report in a secure portal or website - Power BI](https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-embed-secure#filter-report-content-using-url-filters)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.pixiebrix.com/integrations/microsoft/add-a-power-bi-chart-to-the-sidebar.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
