Deleting columns from a calculated table

I have a data set that is imported as single table.

I have split that table into separate tables using the CALCULATETABLE function below.

Customer = CALCULATETABLE(DatabaseTables,DatabaseTables[EventTypeCode]= “Customer”)

I need to go through each of the new tables to tidy them up including deleting some columns. However, the Delete Column option has disappeared from the menu bar.

How can I remove the columns?

Paul

@PaulBoyes You can’t delete columns of a Calculated Table, every action has an opposite reaction. When you delete a Column, Power BI executes M Code that deletes the column from Power Query.

When you try to delete a column of Calculated Table, there is no option of editing the DAX code automatically, so you can’t. Just use SELECTCOLUMNS function to restrict the column that you show.

Thank you for your reply.

That is a shame because it would have made the download of the database much quicker.

I can, of course, download the components separately but it will be slower.

Thanks any way.

Paul

@PaulBoyes ,

Is there any opportunity to do the data processing further upstream in SQL before bringing it into Power BI?

Alternatively, if that’s not an option but the dataset is quite large, it may be a timesaver to do the pre-processing in Python or R, and then pull the result into Power Query.

  • Brian

Hi @PaulBoyes,

Just checking if the responses above helped solve your inquiry?

If not, what further help do you need? If yes, kindly mark as SOLUTION the answer that helped solved your query.

Hi @PaulBoyes, due to inactivity, a response on this post has been tagged as “Solution”. If you have any concern related to this topic, you can create a new thread.