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.
Related
Perhaps better to rephrase my question.
If I have a powerbi report..
Can I somehow make copies of this report with different data(set?) via an API and on demand?
e.g.
User requests a report with some parameters,
Existing report gets copies with a new dataset and published
tnx
Brian
== origional question below ==
Would anyone be able to point in in the right direction here.
I currently have a c# application that generates reports which are simply excel files.
Each time I create a report I simply open an excel file with some preexisting formatting, set the data in a particular sheet then save it to a new location.
How can I achieve something similar with PowerBI?
Ideaily I'd like to open a precanned powerbi report, pass a parameter to the 'dataset' I've just generated,
I dont have any string feeling as to what the dataset would be, I'm open to whatever works,
database/static dataset created by csharp somehow/webservice/etc.
Can anyone suggest how? tnx
How about creating you Power BI report based on your existing Excel files? Make sure to store them on SharePoint so that the PowerBI Online Service can pick them up w/o additional gateways. You can then use your app to trigger the report refresh as soon as the Excel files have been updated.
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.
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.
I haven't done any changes in my dataset for a while and in the past few days, the refresh and publish features (via PBI Desktop) were working just fine. However, this morning, it suddenly stopped following through the scheduled/automatic refresh which were set 5x a day every 2 hours starting 8AM. When Itrigger manual refresh, it says "Preparing for refresh" but doesn't really follow through with it, so i kept on clicking it but to no avail. After a while, I checked the Refresh History and the error I got was it's timing out.
I was trying to republish it with a newer version which was the same dataset refreshed in a different workspace. Apparently, when I publish it to a different workspace, or if I rename it and publish it to my existing shared workspace, it works. BUT I don't want to push through with this kind of workaround because I cannot afford to redo my the set up of RLS and manage permission in the dataset of my existing workspace.
Hope you can help me on this. Thanks.
Try signing in to the workspace using a browser, then use the Get Data feature (arrow button at bottom left), then choose Files / Local File and select your PBIX.
It's effectively the same results as a Publish from Power BI Desktop, but sometimes the method above works when Power BI Desktop is jammed up.
You might also have a refresh issue, not a publish issue. There's an unannounced-refresh-on-publish feature that most people don't notice:
"When you republish a dataset published from Power BI Desktop and have a refresh schedule defined, a dataset refresh is started as soon as you republish."
https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-upload-desktop-files
I have an Existing report in Power BI with Oracle Data Source from which I had directly access the Table.
But now I need to Change the Data Source of the Report using SSAS.
By Using SSAS, we can access the oracle Tables and deploy the SSAS in Azure Service.
Now through this Azure Service we can access the Data.
My Question is Without any Changes in the Report, Can we Simply Change the DataSource? Because I'm Showing Lot of Graphs in that Report.
Since I'm New to Power BI , Is this possible?
There will likely be an unpredictably large amount of other issues (character encoding, date formatting, etc.) that you'll have to work through.
The way I might approach this problem is, if the tables are exactly identical, or you didn't make any changes within power query (like removing columns, merging tables, etc.) you may be able to modify the M code within the advanced editor, and try to swap the data sources to see if it works.
Go into "Transform Data"
Select the table you want to modify
Click the "Advanced Editor" icon in the ribbon.
Here, I imported an excel file, but for you, it should show some kind of "AnalysisServices" line. I don't have an SSAS database to connect to so I can't validate. Try replacing this line with the connection string to your SSAS datasource and see if it works.
Save, apply update, and see if it works?
Again, this is not really advisable, but if you want to give it a try, and the data sources are identical, this is how I might approach the problem before just re-making the report whole-cloth.