Data Source Credentials and Scheduled Refresh greyed out in Power BI Service - powerbi

I have a problem:
I have a PBI file containing three data sources: 2 SQL Server sources + 1 API call.
I have separate queries for each respective data source and an additional query that combines all three queries into a single table.
Both SQL Server sources have been added to a gateway and I can set scheduled refresh for each source, if I publish them in separate PBI files.
However, I cannot set scheduled refresh for the file that contains all three sources - both the data source credentials and scheduled refresh options are greyed out.
The manage gateway section of the settings page also shows no gateway options. If I publish the SQL Server data (with no API data) I can clearly see my data source and gateway under the gateway heading.
screenshot of dataset settings
Does anyone have any idea why this might be happening?
Thank you,

I had the same problem.
I have a PBI file with different data sources : SQL Server sources and APIs.
On The PowerBI Service the Data Source Credentials was grayed out, so here's what I did :
Downloaded the file
Refresh the file locally and signed up on all data sources (the Server of DB Server name changed but not for the APIs)
published in the PBI Service
It worked for me.

Same problem here. After additional poking around I learned that the "Web Source" (API call) was the reason for the inability to refresh and can cause "Data Source Credentials" to be inaccessible. This was annoying to learn after diving down several rabbit holes.
Several (weak) workarounds
Using Excel's Power Query to connect to the web source. Learn more about Excel's Power Query.
Make any needed transformations.
Put the Excel file in SharePoint Online folder or other PBI accessible directory.
Connect to the Excel file using the appropriate data source (i.e. SharePoint Folder).
Alternatively, if the data is static, you can directly copy/paste values into PBI (if you just need to get this done and move on with your life):
Copy target values
Open Power Query Editor
Home tab -> Enter Data
Paste values into table
Hopefully this will save some poor soul a little of their life.

Related

Power BI :: Some credentials aren't validated as they are set to skip test connection

My problem is very easy: I'm retrieving all stocks about lithium on the ASX market from this web page.
I created a Power BI dashboard that you can visualize here.
As the source is Web I would like to refresh it every day using the Gateway connection, so I have successfully installed it on my computer that I turn on every day:
The problem is that instead of a successful daily refresh I have a daily error:
Failed to test the connection to your data source. Please retry your credentials.
Some credentials aren't validated as they are set to skip test connection.
If I enter in the Edit credentials I see the error:
Failed to update data source credentials: The credentials provided for the Web source are invalid. (Source at https://www.marketindex.com.au/commodities/lithium.)Show details
This because I'm using Authentication method: Anonymous and Privacy level setting for this data source: Public. But this is exactly what I'm using on Power BI desktop and it's working!
What am I doing wrong here?
Why the same connection is working fine on Power BI Desktop but not the same dashboard uploaded online?
EDIT: the On-premises data gateway looks installed without problems
It seems like the issues you're experiencing may be caused by the link you're using (https://www.marketindex.com.au/commodities/lithium), although I'm not sure exactly why.
For example, as has been mentioned in the Do I Need a Gateway for Web post, one can use Web.Contents instead of Web.BrowserContents in the raw M code in the Power Query Editor to avoid using a gateway. However, when I test this implementation using the link that you provide, I get an error when refreshing from Power BI online.
If I test this implementation using an HTML table from the https://tradingeconomics.com/commodity/lithium website, though, and set the data source credentials as follows, then I am able to successfully refresh the dataset from Power BI online.
I tested this with another HTML table from a random webpage and an online refresh worked as well. So it seems like there is something odd about how Power BI online interacts with the Market Index website and this is causing your issue. Potentially because of some authentication configuration on the Market Index side of things? I'm not able to help with looking further into why this is occurring, though.
Would you be able to use a different website with similar information as a data source for your report? If so, you could avoid the issues you're experiencing and avoid using a gateway in general if you wanted.
If you go this route, it seems like using the included "Scheduled refresh" setup in Power BI online works, but I will include the Power Automate scheduled refresh setup below in case this is desired instead.
Power Automate Scheduled Refresh
One can use Power Automate to "schedule" dataset refreshes instead of the included "Scheduled refresh" functionality in Power BI online. The steps are a little too long to include here, but the Refresh your Power BI dataset using Microsoft Flow article outlines the process on setting this up. There are various triggers that you can use to trigger your flow. The linked article uses one that triggers based on a SharePoint action, but there is a Recurrence trigger that can be used to trigger your flow at regular intervals/times.
Just set up your flow, make sure that it is "turned on", and your dataset will refresh at regular intervals from the cloud.

Refresh Power Bi dataset based on Onedrive Excel file

Im trying to just understand the basics of Power Bi service refreshing reports from datasets, and despite several questions on here (like this one and this one) and several microsoft articles, Im still lost.
Lets say I go on my corporate onedrive account and create a very basic excel file. Two columns, some fake names and fake numbers.
Then I close that. Open Power Bi desktop and create a very basic report where I just dump that data into a table. Also worth pointing out I bring that data in using this method to copy and paste the sharepoint path to the file (and do all the other stuff on that page as far as authenticating my work account, getting the data, etc.. I do that because in other places I read that if the onedrive path was the path as its seen on your computer, it wont work.
I then publish the report to the service online. Works great so far.
I now want to refresh my report based on a change I made to the data. So I open the onedrive excel doc, change a number, save and close.
Now no matter what I do, the report wont refresh. When I click to refresh here:
It gives me this error:
When I google that error it says I need to change the permissions, so I go to the data source settings in Power bi desktop and have done all sorts of things in various attempts. I.e. "clear permissions" or "edit permissions" and make sure it says "none", etc... etc..
What am I misunderstanding?
Lastly, I dont understand it at all, but Ive heard previously I may need a "gateway". At one point a week or two ago I had my companies IT department install a gateway and as far as I can tell its on right now:
I was told I need to select OAuth2 as the Authentication method, but where I would expect to find the menu for dataset credentials (pic below, I'd expect it to read dataset description, then gateway connection, then data source credentials) I dont even see the option:
Also obviously that warning on the screen (cant refresh because data sources dont support refresh) sounds relevant, but a- it looks like the whole error isnt even there, b- its just an excel file on onedrive, shouldn't that work?
After publishing the pbix in the Power BI you need to configure the data source credentials to use OAuth2.

Adding static Excel to automatically refreshing Power BI report

I have an existing PowerBI report that imports data from an SQL Server analytics services database. This is working fine and I can schedule automatic refreshes using the Gateway provided by my organization.
I would now like to add some additional, but rarely changing data, that I only have in a local Excel file. When I do add this data, the report stops refreshing automatically and complains, that it has no gateway to refresh this Excel file.
What I would like is that Power BI is refreshing the data of the SQL Server analytics services database, but just keeps the existing Excel file without updating it. - I will upload an updated version of the PowerBI report if I need to change the data in the Excel file.
Is that possible? I couldn't find out how. I was trying to upload the Excel file to a different dataset to the Power BI service and reference this dataset in my report. Just to find out, that I cannot access a different Power BI dataset and SQL server analysis services database from the same report.
Three things I can think of
Upload the file to onedrive/sharepoint so that it's accessible online (per Dev's answer)
If the data is simple enough, you can add the data directly into PowerBI itself and skip the Excel file entirely.
You can disable the Excel file refresh so that PBI does not try and refresh(and thus access) the local Excel file. (Not sure if this will work)
I had a similar issue I came across. Yes, you can just use Enter Data to add a table, but you can only build something with less than 3000 cells, so you'd have to merge several tables if something was larger than that.
Turning off the report refresh in the suggestion above (#3) still requires a gateway, unfortunately.
I just created a dataflow and plopped the data from my csv there. You'll have to create a connection and refresh it, but you don't need to schedule a refresh there, so no need to create a gateway.
Then just link the dataflow as a source to your .pbix file and setup your gateway to point at the dataflow.

Dynamic Power BI OData data source location

We have a web application which is installed on customer sites.
They get to choose the name of the web server and the port that it runs on.
The web application exposes some data via an OData endpoint.
The web application also serves some template Power BI files (.pbit)
At the moment, when the customers run the pbit files for the first time, the data refresh fails and they have to relink their data source.
We use data source referencing and store the location of the endpoint in a parameters table but it's still a pain for the customers to have to change this value, and, since we (the web application) know the endpoint URL, we'd like to be able to update the pbit file with the appropriate setting.
Ideally we'd like an API to be able to manipulate the pbit file, or maybe to be able to supply parameters to Power BI desktop, or even load the pbit file (which is a .zip file as I'm sure you know!), and alter the appropriate part within it.
Has anyone actually managed to do programatically or dynamically change a data source URI without needing manual intervention?
Thanks.
I would use the Query Parameters feature for this (more details in the link below). Note as of the July 2016 update, the source for parameters can now be another Query.
So I would build that "parameter allowed values" query by pointing at an Azure SQL instance or some other web-visible source that helps them choose the right value.
https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/
https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-july-feature-summary/

Can powerbi file be refreshed on a different computer?

I need to refresh the dataset on a powerbi desktop file. The data source is an excel file placed on my onedrive for business folder - to which I have access to. I also saved my pbix file in the folder, however I am using a Mac as of the moment and the only way I'm thinking of is to share the pbix file from one drive to my colleague from work. Will that work, or is there any other way to refresh the data without connecting to the desktop file?
P.S. I've check the refresh, but since my work laptop is offline - I can't schedule a refresh
In powerBI without sharing the pbix file you can share the dashboard with your colleagues just by selecting 'share' on the dashboard.
For the data source you can use an online database instead of the oneDrive file.
The way to allow PowerBI to refresh data from your Onedrive for business is to "share" the file in Onedrive for business. https://medium.com/#Konstantinos_Ioannou/onedrive-powerbi-desktop-use-valid-paths-to-import-data-stored-in-onedrive-for-business-60089848e594#.e9wn6kqjn
Then you can share a) either the PBIX file (refresh will be enabled; authentication to the file is "oauth2"). Or you can upload it to the PowerBI web service and share the dashboard there. You need to reauthenticate the data source and then also scheduled refresh will work.
I would publish your report to the PowerBi online service. Here you can then share the report with your colleague and setup a schedule refresh using the data gateway.
This would require a network connection though.