Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Sietoebie
New Member

Name of query changes

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?

 

1 ACCEPTED 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. 

View solution in original post

3 REPLIES 3
Sietoebie
New Member

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)

 

name of sheetname of sheetquery (containing 13 times 1)query (containing 13 times 1)column added in query causing new sheetcolumn added in query causing new sheetnew query name (14 times 1)new query name (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. 

v-jingzhang
Community Support
Community Support

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? 

vjingzhang_0-1679279007811.png

 

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. 

vjingzhang_1-1679279288415.png

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors