Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I would like to find a way to add a date stamp to my query names. I'm in the midst of learning parameters and am trying to put the pieces together. Here's what I'm working with:
I have a data source that receives updates periodically, but the filename which is "Project Schedule", never changes. I would like to set my scheduled refresh to a weekly cycle, and each time the data refreshes, two things happen: a timestamp applies to the query name (such as: "Project Schedule" source name becomes "Project Schedule 08 30 2021"), and, the new "Project Schedule 08 30 2021" is added into my list of queries that grows by 1 new query each week.
The key is to achieve this using scheduled refresh/automation.
Thank you very much in advance,
Dan
Solved! Go to Solution.
You cannot. Query names are part of the metadata and neither DAX nor Power Query can touch those, and Power Query cannot generate new queries dynamically like this.
You would need to add this information as part of a field within the query.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingYou cannot. Query names are part of the metadata and neither DAX nor Power Query can touch those, and Power Query cannot generate new queries dynamically like this.
You would need to add this information as part of a field within the query.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingI was afraid of the first part, but thank you for clarifying this. If I'm able to take the date of refresh, and add that into a column, then I don't mind if I need to append each week, rather than through the first method I described.
That said, I would want to take the date of refresh, and add it into a column such that it will append THIS WEEK's refresh, to the sum total of all previous weeks' data.
Is this possible?
Thanks again.
No, you cannot do that either. The issue is when you refresh, everything refreshes, so you get 1 date for all refreshed data. It will not keep track of what you did last week vs this week. The right way to do that is to add the "data date" to the source data. If it were Excel files for example, you could use the "last saved date" from the file, But even that might not be correct if someone opened and saved, without changing data, a 3 week old file. It would have today's date.
There is an interesting hack for this in this article by tricking Power BI into thinking it is an incremental refresh, but I would not recommend it for a production environment. If you updated your data and republished your file, all of your historical dates would get trashed unless you used ALM Toolkit to preserve and change the dates back.
Chris Webb's BI Blog: Incremental Refresh Chris Webb's BI Blog (crossjoin.co.uk)
But if the source data had the data date, then it would just always work.
Remember, Power BI when it refreshes (other than legit Incremental Refresh) it essentially deletes the entire data model and reloads it from scratch. And even with true incremental refresh, it isn't retaining refresh dates like you are envisioning. It is just partitioning the data so it can save time on large data model refreshes.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingCheck out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
10 | |
8 | |
7 | |
6 | |
6 |