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

Import/refresh data which is subset of table

I use Import Data with Personal Gateway Scheduler to refresh data, but I don't want to have data of whole table, just subset of table based on conditions.

 

Example:

 

I have Country (Dimension) and InvoiceDetail (Fact) table. I just would like to import/refresh all invoice detail rows belong to UK.

 

One approach that I see is using database view in order to apply conditions and let powerbi connect to that view instead of table. It is not straight approach, though. That's why I would like know how Power Bi deals with this case in simpler way.

 

 

 

 

 

 

 

 

3 REPLIES 3
nikil Member
Member

Re: Import/refresh data which is subset of table

Power BI service does not provide an option to use parameters while refreshing data. You have to manage this in the data modeling layer. When a refresh is performed, complete dataset is refreshed. In your example, Country (Dimension) and InvoiceDetail (Fact) table is completely refreshed. 

Now if you want only UK data in InvoiceDetail table refreshed and non UK data to be static, create two queries, one for UK and the other for non UK. Here make sure only UK data gets updated (using SQL parameters etc). Append both these queries to create InvoiceDetail query.

 

Hope this helps.

 

--nikil

 

 

cuongle Member
Member

Re: Import/refresh data which is subset of table

Hi @nikil,

 

Thanks for the answer, what I meant is I don't want to have non UK data in  powerbi file at beginning when importing as well as refreshing.

 

Please could you elaborate more how to create query to to refresh only UK data

nikil Member
Member

Re: Import/refresh data which is subset of table

Depending on the data source you have two options:

  1. Create a query that imports only UK data (e.g. writing SQL statement where clause)
  2. If you cannot filter only UK data in the source query, import all the data into query editor and then filter to include only UK data

 

Once the desktop is published, on scheduled refresh it will import only UK data.

 

Thanks

--nikil

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: 114 members 1,617 guests
Please welcome our newest community members: