How do I move Power BI parameters to another page? - powerbi

I've created a Power BI report with a dozen parameters slicers in it. Now I want my parameters and my charts/tables to be on separate pages. Copying and pasting the visuals onto another page somehow unlink it from the parameters.
How can I put my existing visuals and parameter slicers on separate pages?

Related

Power BI - Syncing slicers

I would like a monthly report that would update all pages based on a slicer from one page.
On one of the pages I encounter an issue because I only want one of the visuals to be affected of the "master slicer".
Page with "Master Slicers"
Page where I only want the top visual to affected, the second I would like to see all months
Make the synchronized slicer visible on the target page.
Use Format>Edit Interactions to configure the slicer to not filter selected visuals on the target page.
Edit the sync slicer to not be visible on the target page.

Power BI custom view (like with tableu)

In tableu it is possible to create views for tabs and can select which view as below. Is this possible in Power BI or is the only option to create a separate tab in the power BI dashboard for each view.
This ability (as shownon YouTube) is not possible in Power BI. If I move around tiles, for example, then that's it. The dashboard has changed. There is no, "I'd like to save what I'm looking at as a link or tab on this dashboard." If you want another view of the same dashboard, then click the 3 dots & hit save a copy & do whatever customization you need there instead.

Work with Power BI Matrix taking data from DAX statement

I have the following requirements:
The user will see a Power BI Matrix on a web page (as opposed to Power BI Desktop).
The web page should have three elements: a text field, a button and the Power BI Matrix (potentially included in a Power BI Report).
The user will enter the DAX statement in the text field and click on the button to direct the Matrix to take the DAX statement, execute it, and populate the data.
The user should be able to drill down in the Matrix.
The user may reenter a new DAX statement, refreshing the Matrix.
Now, all the documentation I could find, for example here, talk about the Matrix in Power BI Desktop (i.e. not web page) and the data taken by selecting manually tables/columns/measures (on the right side of the screen).
In Power BI Studio, I know that I can enter a DAX statement by creating a table in the top bar, for example if I have the DAX:
EVALUATE TOPN (3, branches)
I could create a table to populate the Matrix with:
BranchesTable = TOPN (3, branches)
But how to dynamically link a DAX statment defined at run-time to a Matrix on a web page?
This is not currently possible to do exactly what you want. You can dynamically change a data source and update the query used in a specific report but there isn't an API available (PowerBI REST or PowerBI JavaScript) to update what columns are on a visual in a report. You can get pretty close to what you want but the report cannot be displayed in View mode and it will have to be displayed in Edit mode so the user will have the ability to drag the fields generated from their updated DAX query results onto the Matrix visual manually if they submit a change.
Assuming you already have the pre-requisite App Registration setup and configuration completed and your ready to embed here are some steps to get close to what your looking for. If your not ready to embed there is some documentation below the 8 steps I provided to complete the pre-requisite setup to be able to embed.
Using PowerBI Desktop Create a template report that has a matrix visual and a connection to the data source you want to use. Be sure to set this report up using a specific query and NOT all tables in the data source whether its SQL or SSAS. (You specify the query under advanced options when you initially setup the data source in the report)
Setup a Power BI Data Gateway to the Data Source your report uses
Create a workspace on PowerBI.com to upload the report to
Using PowerBI desktop Publish the report you created in step 1 to the workspace you created in step 3
On your Web Application, when a user views the report viewer page, you need a way to identify each user. Lets assume you have UserId field that is a unique ID for each user. Call GetReports in group https://learn.microsoft.com/en-us/rest/api/power-bi/reports/getreportsingroup. You need to have a known report name plus the UserId. Lets assume its DynamicReport. So call GetReports and check if DynamicReport_UserId exists for the user trying to view the report viewer page in your web application.
In that API calls result from step 5, if the report does not exist for a user, use https://learn.microsoft.com/en-us/rest/api/power-bi/reports/clonereport to clone the template report you published in step 4.
Embed and display user specific template report (DynamicReport_UserId) for the user.
Have logic on the report viewer page so the user can submit and POST a DAX query. When they do a submit have logic to use https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/updatedatasources on the back end to update the data source in their report and then embed the report again with their DAX statement and changed data.
The visual isn't going to automatically update to the new fields from the new query that is submitted by the user but the available data fields they have in editor mode will change. The user will have to drag and drop the fields from their DAX query onto the Matrix visual or whatever visual type they are going to chose to use. You won't be able to just display a report in View mode since you don't have a way to programatically update what fields are on visual. The user may even end up seeing a broken visual initially because of the changed query and the visual referencing fields from the previously used query. You could use PowerBI Javascript API to hide the existing visual to improve the user experience of the user not seeing something broken.
Let me know if you have any specific questions about these API calls or how to use them.
Here is where I've been looking for the Power BI JavaScript functionality https://github.com/Microsoft/powerbi-javascript/wiki (Can't find anything specific to matrix Visuals. The JavaScript functionality for visuals generic to Visuals and not Visual Type like Matrix or Card)
Here is Microsoft's documentation on the available REST APIs and https://learn.microsoft.com/en-us/rest/api/power-bi/
Here are some good resources to learn more about embedding
https://learn.microsoft.com/en-us/power-bi/developer/embedded/register-app
https://learn.microsoft.com/en-us/power-bi/developer/embedded/embedding
If you need drill down capability Hierarchies are a great option
https://spreadsheeto.com/power-bi-hierarchy/

Is it possible to change OData query, via user input, in Power BI?

I need to create something, which is being used a few times a year.
I need to get the latest rows since the report was used last.
My OData endpoint allows me to modify a timespan, to limit the number of rows I get (if I get all of them, I will get 12+ million rows).
The users aren't going to be knowing anything about Power BI, and I want to avoid them having the change the query manually. What I basically want is a slicer, allowing them to input a date, which will then be parsed into the query, instead of the original value, and then update the table with the new query.
An example of a filter on the OData query, selecting all files from 2020, is this:
Files?$filter=Created%20ge%20datetime%272020-01-01T00:00:00%2b01:00%27&$select=ID,......"
If it is possible, then how would I achieve it?
Slicers can't change queries, except in DirectQuery models. And OData isn't a DirectQuery source. You can build up a dynamic query on refresh, or you can have your users refresh using PowerBI and change a Parameter.

How to "Revert to default" on all Power BI Visualizations in one operation?

I have inherited a set of reports in Power BI and need to update and add to the existing pages. I want to apply a custom theme to all the visualizations for a consistent look. Some of the visualizations have been individually formatted using the Power BI Desktop and therefore the imported theme does not control the individual visualizations.
Is there a way to apply "Revert to default" as a single operation on ALL visualizations and their properties without having to drill through one by one?