Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
When I change something (eg adding a column) to my query - the name of the query changes and I have to change my VBA code which I use to refresh the query.
And the outcome of the query is on another worksheet.
My query was: UpdateBackorders
In my VBA code I use the refresh method of the query.
But as stated, when I add a column to my query the query is renamed to UpdateBackorder1.
As for now I have UpdateBackorders11111.
This is very annoying since the output table is linked to a pivot table so I have to change the source of the pivottable.
I can also delete the 'old' table 'UpdateBackorders' and then rename the new table from 'UpdateBackorders - 1' to 'Update Backorders'.
Also: when I then reopen the tool with the UpdateBackorders query I see that the UpdateBackorders query (and all the queries used within this query) have now a (2) after the name. So in VBA I must rename the queries (2) back to their normal name..
Any ideas?
Rewrite everything?
Solved! Go to Solution.
I seems to be solved..
I duplicated the masterquery and this one loaded to a new sheet; (logical)
Then I added some columns to this new query and it loaded to the same, new sheet. The query name stays the same.
But now I'm wondering why this happens to the original query.
Hi,
Thanks for answering.
The 'master'query exists out of 8 queries.
I can't provide a demo, but here are some screenshots.
- name of sheet
- queryname1 (already containing 13 times 1)
- new sheet (after adding a column to the masterquery)
- new query name (containing 14 times 1)
I seems to be solved..
I duplicated the masterquery and this one loaded to a new sheet; (logical)
Then I added some columns to this new query and it loaded to the same, new sheet. The query name stays the same.
But now I'm wondering why this happens to the original query.
Hi @Sietoebie
This looks weird. Usually when editing an existing query, the query name will not be changed. Do you have only one query in the Queries pane but the query name is always changed automatically after editing?
And for an existing query which has been loaded before, it only supports the "Close & Load" feature. "Close & Load To..." option is disabled so it will be loaded to the old position with the current name.
Can you provide some screenshots without sensitive info to show the problem? If possible, can you create a demo sample file without sensitive info which can reproduce this problem and share it here? How to provide sample data in the Power BI Forum - Microsoft Power BI Community
Best Regards,
Community Support Team _ Jing
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
102 | |
53 | |
21 | |
13 | |
11 |