There was a great new feature that snuck in unannounced to the July release of Power BI Desktop. It was only a tweet by my colleague Imke Feldmann from http://www.thebiccountant.com/ that I was even aware it was there.
Include in Report Refresh
When you look in the Queries pane in Power BI Desktop, you will see your list of queries in the Queries pane on the left hand side. Simply right click on any of the Queries to see the new feature (shown as 2 below).
You can see the new check mark “Include in Report Refresh” which obviously can be toggled on or off (it is on by default). This is a step towards partitioning, which is available in SSAS Tabular.
So What Can I Use This For?
As soon as I saw this, I thought of an immediate use case that will add a lot of value for me (maybe you too). I have a client that I complete reporting for on a weekly cycle (I only process the data once per week). I import daily extracts of data into a data warehouse (once each week) and then provide weekly reporting and analysis tools. I also have some business users that need daily reporting on a subset of the data – but I only process the data on site once per week.
The Old Process Was to Load a History Table
The process I have used so far to solve this problem is as follows:
- Prepare a “history table” (illustrated as 1 below) that has sales going back to the start of the year (up until a point in time). This history data is an Excel table in a workbook and I refresh then store this on the client file server.
- I then have a daily sales report (2 below) that refreshes off the daily file extracts (3 below) that get placed on the server each night. The client just opens the workbook (2 below) and clicks refresh – it then cycles through the new files and imports the data needed.
- The Workbook (2 below) also processes the history file (1) and appends the historical data to the new data to create the daily sales report needed.
The Benefit of this Approach
The main benefit of this approach is that you don’t need to load data from hundreds of individual files. Power Query is very capable to load data directly from files, however this approach can be slow if you have lots of files and the files are very large. In my case, the files have around 50,000 rows each, and there is one file per day. To load data from 200 files like this would likely take 30 mins or more.
There Are a Few Problems With This Approach
- The longer I leave it to re-create the history table, the slower the daily sales query becomes, as it has to cycle and load more and more daily files to extract the few product lines needed for the report.
- There is a bit of effort to re-run the history table every couple of weeks. I then also need to reset the daily queries to only bring in data that is after the data in the history table. I have parameter tables set up to do this, but there are still a few manual steps.
- I then of course need to copy the additional history file to the server each time I create an update.
Enter the New “Include in Report Refresh” Feature
Given the above, I immediately saw the opportunity to replace my entire history table process with a new history table directly inside the main Power BI Desktop file. The new pattern that I will use is as follows.
- Add a new history table directly into the workbook.
- When I refresh the workbook against my data warehouse, I will switch on the “Include in Report Refresh” menu, refresh, then turn it off again.
- I will modify the daily refresh Query to extract the last sales date from the history file, and to start the daily refresh from that date automatically. Given I know the history table won’t change (because refresh is disabled), there is no chance that the queries will execute in the wrong order and muck everything up.
- Send the workbook to the client.
The changes above will make this process easier and faster to maintain, and also faster on average to refresh every day.
And this Feature Could be Even Better
One extra feature I would like to see from Microsoft is to allow this setting to be configured with a parameter using the Power Query Language (PQL). An example would be if an error was detected (using the Try command) when the Query failed to connect to my Data Warehouse, then turn off the report refresh for this table. Now that would be something! Please vote for that idea here.
I am now not sure the place you are getting your information, however good topic. I needs to spend a while studying much more or figuring out more. Thanks for magnificent information I used to be looking for this information for my mission.
Hello there, just became aware of your blog through Google, and found that it’s truly informative. I’m gonna watch out for brussels. I’ll be grateful if you continue this in future. Many people will be benefited from your writing. Cheers!
An interesting discussion is worth comment. I feel that you should write more on this topic, it won’t be a taboo topic but typically individuals are not sufficient to speak on such topics. To the next. Cheers
Super-Duper website! I am loving it!! Will be back later to read some more. I am bookmarking your feeds also.
Hello my friend! I want to say that this article is amazing, nice written and include approximately all important infos. I would like to look more posts like this.
Thank you, your article surprised me, there is such an excellent point of view. Thank you for sharing, I learned a lot.
It’s a shame you don’t have a donate button! I’d certainly donate to this superb blog! I guess for now i’ll settle for book-marking and adding your RSS feed to my Google account. I look forward to new updates and will talk about this blog with my Facebook group. Talk soon!
I in addition to my friends were found to be going through the nice techniques located on your site and so immediately I got an awful feeling I never expressed respect to you for those secrets. The women are actually warmed to read through them and now have very much been making the most of them. Thank you for getting considerably considerate and also for picking out this form of fantastic ideas millions of individuals are really needing to be aware of. My very own honest apologies for not expressing gratitude to you earlier.
amei este site. Pra saber mais detalhes acesse o site e descubra mais. Todas as informações contidas são informações relevantes e exclusivos. Tudo que você precisa saber está ta lá.
Simply a smiling visitant here to share the love (:, btw great design and style.
Hi, Neat post. There is a problem along with your web site in web explorer, may test thisK IE nonetheless is the market chief and a large part of folks will omit your magnificent writing because of this problem.
you’re really a good webmaster. The web site loading speed is incredible. It seems that you’re doing any unique trick. Also, The contents are masterwork. you have done a great job on this topic!
You actually make it seem so easy with your presentation but I find this topic to be really something which I think I would never understand. It seems too complicated and very broad for me. I’m looking forward for your next post, I will try to get the hang of it!
I like this web site very much, Its a real nice berth to read and find information.
You have noted very interesting points! ps decent website .
PQL? Haven’t heard that term before, but would love it if the teams would standardize that, as it would get us a great search term!
This is a great post, Matt, and I’m super excited to see this come to Excel (hopefully) soon!
I am planning a mini blog some time to get a permanent presence for this term PQL. It just seems to work for me, which is why I invented it. I posted the suggestion at this idea. Maybe you could vote for it. https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/11680242-provide-an-official-short-name-for-power-query-for
Here is my original Tweet https://twitter.com/ExceleratorBI/status/694261692277006336
+ a way to schedule this (daily, weekly, … or against a customised schedule-table)
Matt,
An interesting and useful feature! Added my votes to extend “Include In Report Refresh” further with parameters and error/event handling.
That will be so cool!