Real time data report in powerbi service - powerbi

We have a react app where i want to embed a powerbi service report.
That report (kept in powerbi service) data will update the user interact with our react app's database.
I know there is a way-
if we connect that report with an SQL database source, and everytime that database source is refreshed, we will hit a powerbi provided 'refresh report api' and the updated data will be reflected in the embedded report..
But I want to know if there is any other more elegant way to achieve the same?
Alternative way-
also if there is a way to create a new report inside powerbi service just by hitting a powerbi endpoint with given json, and then embed that newly created report inside our application. that will be better.
as far as i have seen there docs they have apis to clone, delete, update a report but not to create one?
in case you know please let me know.
Thanks in advance.
my another related question is here for more reference - Create a report in powerbi service through APIs in React
also this community discuss - https://community.powerbi.com/t5/Service/Create-a-report-in-powerbi-service-through-APIs-in-React/m-p/3055794

If you use a DirectQuery model the report will generate queries to your database when the user interacts with a report. There will be no "refresh".

Related

How to call a CRM action from powerbi

Need to call a CRM Custom Action with parameters from Powerbi
Please help me with this.
Thanks in advance!!!!
Power BI is just a data visualization platform, not a replacement for app development.
When you want to do such things like clickable action in each row of PowerBI report list of records - maximum possibility is hyperlink (url). Unfortunately CRM Custom action is not url accessible, but that too you want with paramters. Forget it.
I have other ideas shared in this SO answer, like you can try Power Automate (MS Flow) or custom API to explore by url accessibility.
You can also achieve your requirement with the help of Power Automate.
Steps -
Create new flow with Http Trigger
Invoke flow URL from power BI
Call custom action from flow
Please mark my answer verified if i were helpful

Power BI Embedded Report Picker

I have an embedded site for my users to view a report. I have one master login for Power BI that all customers are routed through.
Authentication and the request are done through a .NET backend using PowerBI.Api.V2. Everything works well when I hardcode a single reportId and embed the fullscreen iframe.
My question is for customers that have multiple reports; Is there a built in report-picker-report that I can embed where the report selection is already handled for me? Or should I work on building an interface after retrieving the list of reports my users can pick from?
No, there are no built-in pickers. Power BI provides an API interface and you must implement these for yourself. Of course, you can build these pickers and make them available for us :)
To get list of workspaces you need to call Get Groups. This will give you a list of user's workspaces. You can show their name property values to the user, but you will need their id (the guid). When you know the id of a workspace, you can list the reports in it by calling Get Reports In Group. The same way you can call Get Dashboards In Group and Get Tiles In Group.

How to apply filter in PowerBI WebApp

I have created one WebApp which is hosted on Azure IIS. I am calling PowerBI reports & Dashboards and rending them into my WebApp.
I need to apply following functionality and I am unable to find solution online.
Users can filter the data from filters available in PowerBI from Web Application.
Row Level Security can be applied when we call PowerBI reports and render into web page.
It is not clear what kind of URL you are using to embed the reports. Essentially, there are 3 URLs that you can use to display a report in your web app:
The URL taken from your browser's address bar. In this case the use of you web app needs to be logged in Power BI service and to be granted with rights to see this report. One of the disadvantages are that in your web app you will not see the report only, but the whole Power BI page (including the navigation menu at the left).
The URL taken when you share this report publicly using Publish to web. In this case only the report will be embedded in your web app (menus will not be visible), but you can't do that for reports over RLS enabled datasets (because RLS requires user's identity, while in this case the access is anonymous).
The embedUrl of the report (or tile, or dashboard) that you can obtain using the Power BI REST API. It is usually used when you have a dedicated capacity assigned to this workspace (Power BI Embedded). In this case there are two scenarios - "User own data" and "App own data". In the first one each of your users must have their own account and rights to see the report (as in #1). In the later scenario, you use one shared "master account" in your web app to get access to the report and there is no need for your users to authenticate themselves. You can take a looks at the samples to see how it works. Essentially, you need the JavaScript Power BI client, one HTML page with a and some JavaScript code to load the report in the (check powerbi.js, ReportLoader.html and ReportLoader.js files from the samples. A good place to start is this article - Tutorial: Embed a Power BI report, dashboard, or tile into an application for your customers.
To apply filters to the embedded report, you can use one of the recently new features (if I'm correct, it is available since August 2018) and add the filters in the URL. I'm not sure will this work in case #2, but I will not recommend using it anyway.
RLS is not possible with case #2. In cases #1 and #3 RLS will simply work. With #3 if you use "app own data" scenario, for the RLS to work you need to pass user's name and role when you generate the token to access the report (because otherwise for all user's requests Power BI will always see the identity of your "master account" and RLS will not make any sense). This is specified with EffectiveIdentity parameter.
You also attached "power-bi-report-server" to your question, but at the same time you are saying that your web app is running in Azure. If after all your reports are on Power BI Report Server on premise, then you can embed reports by passing rs_embed=true parameter at report's URL too. In this case to make RLS work you just need to make sure that your users are authenticated with their own accounts. Passing filters in the URL works with the recent versions too (it was broken in March 2018, but fixed in 15.0.2.389).

Dynamic parameter insertion to filter data in iframed dashboard from with in webapp

We have a web applicaiton used by over 1000 customers.
We would like the abilitu to assist over customers to analyse their account level information i.e. Spend analysis, account overview, product overview.
What we are looking to find a way of passing a customer ID to a query datasaet that pulls customer specific information from the database and binds it to the published iframed power bi dashboard on the go.
Thanks in advance
I would suggest to design a generic report on Power BI desktop using the Customer ID as a report level filter. Then, when you embed the report in your web app, you can set the filter to each customer's ID by passing it as a parameter on the embed report URL:
https://app.powerbi.com/reportEmbed
?reportId=d2a0ea38-...-9673-ee9655d54a4a&
$filter={tableName/fieldName}%20eq%20'{fieldValue}'
(from Power BI embedded documentation)
If you need more ability to interact with your report I'd recommend the documentation on the JavaScript API for Power BI Embedded.

Is there a way to pre-filter a powerBI report server side?

I have uploaded a report, and using the .net SDK I've embedded said report into my website. However we show private data for many organizations. If I edit the reports iframe url to filter the report by the users org id so they can only see data for their organization then that ends up being a URL you can edit in javascript on the client side so a use could put another id there and view some other organizations data.
Is there any way possible to filter the data a report shows before it is sent client side?
I know you can edit the report file it'self but if you have hundreds of organizations, you'd need 100 copies of the same report which is obviously a maintenance and upkeep nightmare.
I would use the "Row Level Security" (RLS) feature for this requirement. Basically you set up roles, assign users to them and assign DAX expressions to them to filter the data.
There's a good explanation of it here:
https://azure.microsoft.com/en-us/documentation/articles/power-bi-embedded-rls/
The most efficient design of RLS (from a coding and admin perspective) is if you can feed in a username variable and filter your data by that (as shown in that example).