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
LukeTemp
Frequent Visitor

Coordinate Deletion of Columns Between SQL Server source table and PBI Desktop Power Query

Hi all,

 

Relative newbie here, so please assume I know less than I should 🙂

 

I have a PBI Desktop dashboard I'm working on, with several data sources, all pointed at tables in a SQL Server database, via connectivity mode: Import.

 

A requirement of this report is that I be able to refresh from updated source data on a regular cadence. 

 

I have done quite a lot of development on a particular visual, and have now reached the point where I realize that the source data needs two columns removed, so I can group by several other columns and aggregate my data. I'm accustomed to working in Excel (via ODBC connection), where if I change the source table and refresh in Excel, it will just accept the change and refresh the data. If a column is missing it might break my visual, but it doesn't break the data connection.

 

In PBI by contrast, if I remove the columns from the source table in the database and then refresh in PBI, it will load the data, but my query definition breaks, so I can never work with the query definition again. Obviously not tenable.

 

All the instructions I find online for removing columns have to do with adjusting the query after the navigation step, which doesn't solve my problem of a source table that has changed. What I need is to be able to tell PBI "This source table no longer has these two columns, so don't look for them when you refresh from the database."

 

Some things I've read have talked about opening up the advanced editor, saying that you can see the individual columns queried there and remove some as needed. In my case, the advanced editor simply references the entire table.

 

Any solution? I'd be happy to edit the code in the advanced editor, but if that is the solution, please point me to something that demonstrates the specific syntax, since I am not familiar with this language (I assume it's DAX in the advanced editor?)

 

Thanks in advance!

1 REPLY 1
djurecicK2
Super User
Super User

Hi @LukeTemp ,

 You could try creating a new connection to the datasource where the columns have been removed. Then go to Advanced Editor for that data and copy everything. Go to the previous table > advanced editor, then paste everything. Then you can delete the new connection.

 

 

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.