cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
admiralman Member
Member

Conditional Dataset refresh

I'm wondering if there is a way to conditionally update a dataset. I am connecting to SQL Server and populating 4 tables in my dataset from 4 source tables. I would like to only update my dataset if the run date in the source is in the same month as the current month. 

1 ACCEPTED SOLUTION

Accepted Solutions
zoloturu
Advisor

Re: Conditional Dataset refresh

@admiralman,

 

Few advises about REST API.

 

1) You need to have Power BI Pro license.

2) Then register an application (even fake one). See details - https://docs.microsoft.com/en-us/power-bi/developer/register-app

3) Then create a code for authorization token generation - https://docs.microsoft.com/en-us/power-bi/developer/get-azuread-access-token

 

Regards,

Ruslan

3 REPLIES 3
Highlighted
zoloturu
Advisor

Re: Conditional Dataset refresh

Hi @admiralman,

 

It is not easy to use. But I can tell you some approaches:

 

1. Purchase Power BI Premium capacity. Then follow the instructions below you will be able to have only fresh data - https://docs.microsoft.com/en-us/power-bi/service-premium-incremental-refresh

 

2. Another option is to make some code in C#, Javascript or R. In details you would need to retrieve date from a database and compare it to current month programmatically. And assign some schedule to that. Then you can call REST API request to Power BI dataset to refresh it if a date is new. Refer to the link - https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/refreshdatasetingroup

 

Regards,

Ruslan

admiralman Member
Member

Re: Conditional Dataset refresh

Gotcha...since we dont have the need for premium I will look at the REST call to refresh data. Thanks.

zoloturu
Advisor

Re: Conditional Dataset refresh

@admiralman,

 

Few advises about REST API.

 

1) You need to have Power BI Pro license.

2) Then register an application (even fake one). See details - https://docs.microsoft.com/en-us/power-bi/developer/register-app

3) Then create a code for authorization token generation - https://docs.microsoft.com/en-us/power-bi/developer/get-azuread-access-token

 

Regards,

Ruslan

Helpful resources

Announcements
Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 290 members 2,794 guests
Please welcome our newest community members: