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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

The name "" is already used on the table "". How to update a query without altering the UI

Hi All,

 

I have a complex working dashboard created by an ex-employee, and I now wish to alter the data source, without needing to change the visuals.  

 

I assumed that, so long as the column names end up the same, I could replace the query in the Advanced Editor, and the visualls would all work. 

 

When I do this and CLose, I get the error message "The name "Contact Person" is already used for a column on the table "Business Info".

 

I interpret this to mean the Query is not self-contained, i.e. column info is somehow stored outside the query and not recreated when the query changes.

 

Is there a way to change the source of the query whilst not affecting the UI?

 

Here is my new query, it returns exactly the same column names as the resultant dataset of the previous query.

 

let
Source = Csv.Document(File.Contents("C:\Data\FullABR\ABR.CSV"),[Delimiter=",", Columns=46, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Use First Row as Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true])
in
#"Use First Row as Headers"

 

Here is the previous query

 

let
Source = RA,
#"Appended Query" = Table.Combine({Source, RB, RC, RD, RE, RF, RG, RH, RI, RJ, RK, RL, RM, RN, RO, RP, RQ, RR}),
--
-- (some columns reformatted etc)
--
#"Renamed Columns2" = Table.RenameColumns(#"Added Conditional Column1",{{"Business Location - Postcode", "Postcode"}})
in
#"Renamed Columns2"

 

 

2 REPLIES 2
Anonymous
Not applicable

Thanks Liu I will investigate your solution. The error message says "i already in use on this table", but you are saying the error is wrong, it should say " already in use elsewhere in the dashboard". I will check it out.

v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

 

Based on your error message, you supposes change a column name which exists in a table already. And you may also have reference to this column in some calculations within other dataset so that other tables will also throw error related to this column. Make sure your change the name of this referenced column in all measures/calculated columns.

This is the related document, you can view this content:

 https://community.powerbi.com/t5/Desktop/Append-queries-error-Name-is-already-used/td-p/852274

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.