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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
John_Doe3
Helper II
Helper II

Added columns, but now it's complaining I have those in another table already

So there I was... 

 

It started out as a great day. The sun was shining, the coffeemachine was recently topped up, and I was ready to go kick some &^% in Power BI.

 

The first mission of the day: Add 2 columns to every table, and provide them with a simple value for use in filtering later on. After adding these 2 columns to every table, it was time to apply the changes and quit power query.... 

 

This is when disaster struck.

 

It is complaining that it can't apply the changes to 7 out of 8 sheets, due to the fact that these columns are exactly alike (which was the whole point). Power BI kindly asks me to rename these columns, but that would destroy the purpose. After giving Power BI the finger, it was time to turn to the pro's.

 

This is where you guys come in:

What the actual beep is happening here? 

1 ACCEPTED SOLUTION

Hi @John_Doe3,

 

Actual source code means the code that was already there in the Advanced Editor for your table before you make any changes.

When you open the Advanced Editor, you can see some code which is already present, some thing like below:

vachippa_0-1748004570359.png


Copy everything between the let and in lines and just replace it here
“Source = YourExistingSourceStep,” and complete the code as I mentioned above .


If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

 

Thanks and regards,

Anjan Kumar Chippa

 

View solution in original post

10 REPLIES 10
burakkaragoz
Community Champion
Community Champion

Hi @John_Doe3 ,

 

What’s likely happening is that Power BI is trying to auto-detect relationships between your tables based on the identical column names you added. When it sees the same column name across multiple tables, it tries to create relationships automatically – and that’s where things break.

Here’s what you can do:

  1. Go to File > Options > Data Load and uncheck
    "Auto detect new relationships after data is loaded".
  2. Keep the column names the same if that’s important for your logic – just be sure to reference them with table names in your DAX (like TableA[FilterFlag]).
  3. Alternatively, consider adding those columns using DAX instead of Power Query if they’re just for filtering.

 

 

If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
translation and formatting supported by AI

This didnt do the trick. It returns the exact same result. I'm not familiar with DAX coding at all, I have no idea how I would go about this using that method.

Hi @John_Doe3,

 

Thank you for reaching out to Microsoft Fabric Community.

 

The issue here is that power query is conflicting internally when the same column names are added across multiple tables. So to resolve it without using DAX, please follow below steps:

  • Go to power query editor and create a new blank query, rename it and open the Advanced Editor and paste the below code and click on Done:

    let

        AddFilterColumns = (inputTable as table, filterValue1 as text, filterValue2 as text) =>

            Table.AddColumn(

                Table.AddColumn(inputTable, "CustomFlag1", each filterValue1),

                "CustomFlag2", each filterValue2

            )

    in

        AddFilterColumns 

This creates a function that you can reuse across multiple tables.

 

  • And now in the same Queries pane, select the other tables and go to the Advanced editor and replace the existing code with this below structure:

    let

        Source = YourExistingSourceStep,

        Transformed = AddFilterColumns(Source, "West", "Sales")

    in

        Transformed

  • Replace YourExistingSourceStep with your actual source code, copy paste the existing code and change ‘West’ and ‘Sales’ to the filter values you need. Repeat this for each of your other tables.
  • Click Close & Apply in Power Query Editor.
  • Power bi will now load all your tables with the two custom filter columns and there will be no issues with duplicate column names.

 

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

 

Thanks and regards,

Anjan Kumar Chippa

At risk of sounding like somebody who doesn't know dax coding, what is my "actual source code"?

Hi @John_Doe3,

 

Actual source code means the code that was already there in the Advanced Editor for your table before you make any changes.

When you open the Advanced Editor, you can see some code which is already present, some thing like below:

vachippa_0-1748004570359.png


Copy everything between the let and in lines and just replace it here
“Source = YourExistingSourceStep,” and complete the code as I mentioned above .


If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

 

Thanks and regards,

Anjan Kumar Chippa

 

Hi @John_Doe3,

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution I have provided for the issue worked? or let us know if you need any further assistance.
If my response addressed, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @John_Doe3,

 

We wanted to kindly follow up to check if the solution I have provided for the issue worked.
If my response addressed, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @John_Doe3,

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution I have provided for the issue worked.
If my response addressed, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Thanks and regards,

Anjan Kumar Chippa

That's one hell of a quick reply, good sir.

 

I'm trying to locate the checkbox "Auto detect new relationships after data is loaded", but this doesn't appear to be present.

Aha. it is in current file, not under global. brb

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.