Forum Discussion
Get Data from Exiting Power BI Dataset using API
In Power BI, I have a dataset with data that resembles Access token data. When I click "Refresh Preview," it updates. Every API has an expiration date restriction. In a Power BI situation, I need to get information from an existing dataset.
I want to retrieve data from the "NewAt DS" main dataset and put it in the "MDDS" child dataset. I may use Power Query's ```Record.FromTable``` method to retrieve data from the main to the child. But every time it is used, it gets records and updates the main dataset (i.e. NewAT DS). To avoid that, I prefer to just retrieve a value from the dataset without refreshing it.
Can anyone help me with it?
Thanks,
Jay
5 Replies
- v-xiaosun-msftCommunity Support
Hi jaypatel ,
Could you tell us what your child dataset is? And I wonder whether you want to retrieve a value from the main dataset to update "child dataset" rather than "main dataset".
Please follow the following document.
How To Get Data From Power BI Dataset Via An API: EPCGroup
Best Regards,
Community Support Team _ xiaosunIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- jaypatelHelper III
v-xiaosun-msft
Thank you for the response.I have "NewAT DS" as the Parent dataset and "MDDS" as the Child dataset.
I have retrieved data using API and load into the dataset in the Parent dataset. However, here is a little different scenario to load data from parent to chid dataset without refreshing the Parent dataset value.Thanks,
Jay
- ImkeFCommunity Champion
Hi jaypatel ,
the refresh behaviour is how Power Query is designed and to my knowledge, cannot be changed:
Once you reference a query in the PQ editor, the referenced query will also be refreshed. Even if it is set to "Don't include in report refresh".
You could consider moving the "New ATDS"-query into a dataflow and reference that DF instead. That wouldn't trigger the refresh then- jaypatelHelper III
Hi ImkeF ,
I tried to add DatwFlow to get the "NewAt DS" dataset value in it and use the same value in the Child dataset. However, I was able to refresh the dataset on the Power BI Desktop version. Once I published on to the Power BI Service and check in Data Source Credentials, it give me an unauthorized access error. I tried with "anonymous" credentials as there was on pop-up showing that when we use REST API as a data source we need to Sign In with an anonymous user.
Please help me with this.
And another thing to discuss is Why I was not able to set up Gateway for Dataflow?
Thanks in Advance,
Jay
- ImkeFCommunity Champion
Hi jaypatel ,
not sure I understand what's going on here.
But if you have staged some data in the dataflow, you should be prompted to authorize with your (organisational) Power BI account.
Anonymus auth wouldn't work, as that would mean that everyone could access your PBI dataflow.
Auth towards your API might be anonymus, but this would only be relevant when refreshing the (staging) dataflow and not during the dataset refresh.