In PowerBI refresh succeeding on PowerBI desktop, but failing when refreshing on the webpage - powerbi

I created a report in Powerbi desktop. The dataset is a view from a table and I used the Import method and not DirectQuery. There is a lot of data. So when I do a refresh on the PowerBi desktop, it does the refresh but takes a while. When I published my report, and scheduled a daily refresh, the daily refresh fails with the following error
Data source type: SQL
Data source error: Microsoft SQL: Query timeout expired
How can I olve this. I have tried deleting and publishing the report again and again. I also checked the data credentials field in the schedule refresh tab.

I would open the report file in Power BI Desktop and make these changes:
Navigate to the "file" menu (top-left) / Options and settings / Settings
Under Current File / Data Load / Parallel Loading ..., check the Enable parallel loading ... option
Under Current File / Privacy, choose Ignore the Privacy Levels ...
Hopefully that's enough to get you over the line.
If not then I would work on speeding the query design. From your error message it sounds like the generated query is very slow to start returning rows. I'd try to move any Filter, Group By or Choose/Remove Column steps up the Applied Steps list so they have an impact early and reduce the load on your database server.

Related

Power BI Dashboard shows 'Load Data' message twice every time I click on the report link

I have a power Bi dashboard (deployed to a report server) where I have imported the data (query folding is in place), but every time that I click on the report link it shows a message of 'Load data' 2 times before it displays the report.
To allow me to test this on a simpler dashboard, I created a power Bi dashboard where I have imported 1 view with only 3 columns and I have deployed to the server, but I still get the 'Load data message twice every time I click on the report link.
Why is Power BI showing this message twice and is there a way to disable it as this is causing delays when loading other reports.
Is it because of one of the following?
Data eviction
Is it due to how Import uses the VertiPaq engine to store data in memory?
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. Unfortunately, in this case query folding can’t take place and the top 0 filter can’t be pushed back to the database, so the entire query gets run once to get the schema and once to get the data.
Or is there another reason for this and is it possible to disable this?

Exclude from Refresh but Still Getting Error - Power BI

I have a Power BI Report which contains a data flow which is automatically refreshed each morning, and a static excel which contains daily production targets.
The excel file is in a folder on a shared drive, for which I had set up a personal gateway in order to refresh. However, if I am not online the gateway is of course not active.
To try to circumvent this issue, I chose to exclude the excel file from refresh in power query editor. However, when the automatic refresh occurs each morning, I am still getting an error message that the report has failed to refresh as my personal gateway was not line.
Is there another way to avoid this issue?

PowerBI - Automatic Refresh OneDrive Business From Excel File

I have an excel sheet stored in a OneDrive Business Folder, which is updated continuously (approximately every minute). I am trying to show a live count of the number of entries in the table, as below, on a powerBI report:
From here I have tried two options:
1.Created a PowerBI Desktop File which shows the total count on a single card. I have then published this to PowerBI Service as a report.
2.Imported the excel file in via "Get Data->Files->OneDrive-Business" on PBI Service:
I loaded in the data and then created a report as below:
However, when a change is made to the excel file on the onedrive, the report data does not update automatically when any change is made. Instead, the only way that it updates is via the "refresh now" option in datasets on PBI service:
Then once that is refreshed, I have to manually refresh the data in the report window also.
The connection between the report and the excel file is therefore available to allow the manual update, but for some reason does not automatically update when I make a change. Are there are solutions available to get this to update automatically.
I saw this cool idea, but I can't seem to get it to work:
https://bigintsolutions.com/2019/03/29/refresh-power-bi-report-every-min-and-show-on-a-tv/
I have also read many threads, with some people having the same issue I am having:
https://community.powerbi.com/t5/Power-Query/Automatic-Refresh-not-working-when-connecting-to-SharePoint/td-p/546308
I know that there should be an update every hour for PowerBI-OneDrive connections, but I was hoping there was a way for updating live.
Goal: PowerBI Service Report to update automatically, for live data feed to a TV screen, when a change is made, say every minute.
Any help would be greatly appreciated!
Where are you sourcing your data? Updating each minute to an Excel file seems like something that won’t scale in the long term. This sounds like a better scenario for a real-time dataset that is in hybrid mode. Then you could build a dashboard over the data and it would automatically update as the data updates. I’ve used Power Automate to push data into a real-time dataset as well.
Treb Gatte, Power BI MVP

How to use real database in Power BI and make it refresh dynamicaly?

I'm new to Power BI (Free Version) and I have been asked to develop a report system which generates report from an excel sheet, the reports work good for only the data I have collected.
but my question is how to connect to the data immediately from SQL server without the need to convert it to excel and then import it in power BI, I also want the data to be refreshed dynamically.
One of the solutions I tried is to add new dataset but I get the following message:
Refresh can't be scheduled because the data set doesn't contain any
data model connections, or is a worksheet or linked table. To schedule
refresh, the data must be loaded into the data model.
I have looked for many solutions but none has worked.
am I missing a concept? thank you
If this data is stored in a SQL SERVER table it is a pretty straight forward process.
When you create a new power bi report (.Pbix) you should see a prompt asking you if you want to "Get Data". You would select the 'SQL Server Database' option - See the image below:
Then, you will be asked to enter the Server and Database name, and to specify either 'Import' or 'Direct Query' mode. If you choose 'Import' the data will be refreshed every time you access the report or upon 'Refresh' within a report session. If you choose the latter, the connection will always be live i.e. any changes to the data in your database will be reflected in the report.
Once you get passed this window, you will be asked to either specify credentials or use a windows authentication to access the database and server. After that you can either specify a query to pull in some data or you can select from a list of tables.
I hope this helps!!

Power BI embedded, direct query, not refreshing

I have implemented Power BI embedded in a web app with direct query using Azure SQL as data source.
The Azure SQL database is being updated by webjobs and if I leave open the Power BI embedded web app I don't see the visuals refreshing with the new data unless I trigger a query for example changing tab or filtering with a slicer.
In the documentation I found the following:
"If there is no user interaction in a visualization, like in a dashboard, data is refreshed automatically about every fifteen minutes."
Do I understand correctly that an open visual in my case should be refreshing without need of user interaction?
Can you point out to the reason for it not to be updating automatically? Also do you know a way to control the time of the refresh with direct query without user interaction more exactly than the "...about every fifteen minutes..."
When inspecting the connection properties on Power BI desktop I have made sure it indicates "Direct Query".
From my understanding the embedded report won't refresh automatically. However, if you're using the Power BI JS framework (https://github.com/Microsoft/PowerBI-JavaScript) to embed your report from a Workspace Collection, then you can use a refresh() method on the report object to manually get the latest data, provided your report is using Direct Query.
This method is only present in version 2.2.0 of the framework and was then removed in the latest version (currently 2.2.1) while further testing around billing is performed (see https://github.com/Microsoft/PowerBI-JavaScript/commit/5230b2f96b10a1104efecdffe78255b9788526b8).
However, in my testing I found the session count remained unaffected by the refresh method. You can refresh up to intervals of 15 seconds (a limit set by the server). This may change however, given the method was removed in 2.2.1, but using 2.2.0 seems to work currently.
Here's a quick and dirty example which will refresh the report every minute within the allocated session:
powerbi.embed(reportContainer, embedConfig);
report = powerbi.get(reportContainer);
window.setInterval(function () {
report.refresh();
}, 60 * 1000);
If the session expires (after 1 hour currently) then a new JWT will need to be requested and the report needs to be reloaded with the new token.
You may want to implement some checks around the session expiry if you plan to keep the report open for more than the allotted session time.