Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
i am new to power BI and need help.
Can some one help me in knowing if there is a way we can change the queries automatically?
I need to make certain changes in queries everytime i prepare dashboard with new refreshed data.
for example - add a column of previous week in table query every time while preparing report for previous week.
Is there a way, while refresing the data, the necessary changes in queries (or queries written for cleaning data) gets done automatically? like running a macro in excel?
Appreciate your suggestions!
In addition to other’s post, you can utilize Power BI gateway to refresh your dataset in Power BI Service. Once you set schedule refresh for you dataset, data will be automatically changed in Power BI Service based on the schedule after you change data in your original data source.
Regards,
Lydia
It sounds like the way you're loading the data is highly inefficient. You're adding another column for each week? Why not just add them as new rows with a column labeling each row's week? That would be an easy couple of steps in the query editor and would never have to be changed. Adding new columns every week also will very quickly make your file so large it's unusable. Adding rows won't.
Proud to be a Super User!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 46 |