So i have these spreadsheets with database connections and which then get uploaded into a datamodel.

Now my question is specifically about the data model, if i change the source to a different table with the exact same layout it works great and i don't need to do any editing all the DAX columns stay the same, nothing breaks.

But if i change the source to the same table but rename the query all my DAX columns break, it seems to be connected to the query name and not the column name.

Is there a way to change source and retain all columns after renaming the query? otherwise i have to rebuild parts of the sheet.