Why OData api called multiple times in power bi desktop - powerbi

I have a Power BI Desktop application that accesses one Data Source which is an OData feed. When refreshing the data in Power BI Desktop it takes much longer . After clicking on Refresh in the popup it shows "Evaluating" and "Loading 2 KB..." for a very long time. From logs of OData API,I can see that the OData feed is called twice and each request is taking same amount of time.
Why does Power BI desktop call the OData feed multiple times? Is there a way to reduce the number of calls?
Note:
I have gone through Referenced Queries And Caching In Power BI And
Power Query Blog But in my case my not using any transformation.
Just loading OData feed.
I have gone through the post for same
issue at Power BI community and try the suggested approach but
still issue persists.

Case is similar to "why-is-power-bi-running-my-sql-query-twice"
https://blog.crossjoin.co.uk/2020/07/05/why-is-power-bi-running-my-sql-query-twice/
Power BI wants to know the schema of the table before the query actually runs, so it asks Power Query to return the top 0 rows. Probably its also true for OData.
Using M function Table.View should help.
https://blog.crossjoin.co.uk/2020/05/14/speed-up-data-refresh-performance-in-power-bi-desktop-using-table-view/

Related

Refreshing data from SQL in PowerBi

I'm really confused about how i can refresh data that i use in my powerBi.
The data come from a server in SQL, at first time i choosed to use DirectQuery as importation mode, after a litle bit of time i observed that its took time when i want to change things like measure or representations.
So i opted to change directquery to importation in order to gain time.
I would like to know how can i get the newest data from my sql server automaticly, because i have line which is added every day, would i use accrementiel refresh?
Just set up a daily refresh schedule in the Power BI Service. If you have big data with a long history you might also benefit from incremental refresh, but that's alread an optimization step.
Are you aware of power bi gate way ?
Keep your dashboards and reports up to date by connecting to your on-premises data sources without the need to move the data. (https://powerbi.microsoft.com/en-us/gateway/)
You just need to install power bi gateway to your server.
Then you can visit power bi service -> settings -> manage gateway . You can setup new gateway here.
Once you create connection you can schedule refresh time with your UTC time.
Note: you need to buy power bi pro or premium licence for that. Pro licence has 8 times refreshes per day and premium has about 48 times per day(premium is very expensive) .
And their is feature called incremental refresh, you have to setup it prom power bi dashboard.
It may take 10-20 minutes to refresh data set.(mentioned in power bi site)
Hi do you using Power BI desktop?
click on your page not visual, on the visualization you will see,option called page refresh. set this On.
set Refresh type to Auto page refresh.
set Refresh this page every the value you want(seconds,minutes,hours,day).
this picture

I have a power bi desktop connected with sql database and have some reports in it

I have a power bi desktop connected with SQL database and have some reports in it.
Now I want to generate following things
Every time user enter the name of the database my reports gets automatically refresh and exported in PDF or excel.
If possible I have browser where user can enter the SQL database name and UI pop up and end user can see the power BI dashboard where all reports automatically refreshed as per the user input SQL database name.
Thanks in advance!
For ask 1:
Refer Create and use R visuals in Power BI Once R is installed, open the Run R Script and paste the below R script, depending on your destination and save it.
Example as a excel file: write.xlsx(dataset, file = "C:/dataset.xlsx")
If you are interested in (PDF) and know Microsoft Power Platform, use On Power BI button clicked trigger followed with Export To File for Power BI Reports actions API to export a PDF to your local directory. Demo screenshot
For ask 2:
You can check Embed a report in a secure portal or website to easily embed reports in internal web portals and utilize Automatic page refresh in the Power BI service to set automatic page refresh for reports as long as the data source is DirectQuery.
Power BI Desktop has no restrictions for refresh intervals and can be as frequent as every second. But when reports are published to the Power BI service, certain restrictions apply.
Alternately you can use Datasets Power BI REST APIs - to trigger a refresh for the specified dataset from "My Workspace".
POST https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/refreshes
You can also leverage Q&A for Power BI business users the fastest way to get an answer from your data by asking a question using natural language.

Not able to schedule refresh report on POWER BI for web

I was able to refresh a power BI report using the desktop application. But when I am trying to schedule a refresh using the web application I am getting the following error.
I am getting data using the web source. I am using functions in the connection string. Is there a way I can schedule refresh in this case.
The maximum size for datasets imported into the Power BI service is 1 GB and Power BI Service places a limit on the amount of uncompressed data that is processed during refresh to 10 GB.
If you still hit the above two limitations, you are not able to refresh dataset in Power BI Service. You can use DirectQuery/Live connection mode to connect to your data source instead, or purchase Power BI Premium license to solve this issue.
You can also try to solve the issue by creating a view of the table within the source database
References:
https://learn.microsoft.com/power-bi/report-server/scheduled-refresh

Power BI Embedded report does not update in realtime even though the dataset is pushStreaming

I have created a streaming+push dataset in power BI. And i push the data through the rest apis. I can see the dashboard in power BI getting updated with the latest data. But the embedded report in my website doesn't seem to update.
How can we achieve this? Is there any additional configuration required when embedding the report?
Power BI Reports hold a special property that does not allow them to refresh during viewing\editing. This is mainly to allow for presentations & editing, without having to worry about data changes.
However, one can refresh the report view in powerbi.com using the refresh button.
In Power BI Embedded, the developer can periodically call report.refresh() in the JS SDK to simulate the same action. Time intervals can be synchronized with the known realtime streaming times up to a limit.

Writeback services in Microsoft Power BI

How can you do writeback in Power BI?
Does Power BI also support writeback like Microstrategy?
I couldn't find any solution from PowerBI. I saw a workaround using PowerApps, where they created a PowerApp and embedded that in PowerBI and used Flow to automate the task to write back into databases, but it is not so feasible.
Are there any other working solutions?
There isn't any official way to write-back.
You can do the same approach as PowerApp visuals do. In your custom visual, you can trigger an action to writes back to your SQL DB or whatever other source you have, e.g. Push Data Rows or refresh.
You can also trigger a 'Refresh Now' call via Power BI REST APIs to update your dataset from the DB.
If you're in embed mode, there is also a JS SDK call to refresh() the view such that the visuals will now display the new data.
See what PowerOn does in a similar manner.