Forum Discussion
Issue Adding a Data Column to Model in Tabular Editor Then Power BI Picking it up
Hi guys.
New role, not used Tab Editor before (or Power BI). I'm having issues when deploying my model to power BI.
Steps:
Created a new field in SQL (case statement)
Tested code in Sql Server
Added code to table script in Tab Ed
Right clicked on table in Tab Ed, added new data column
Amended appropriate properties to data column (source column, data type etc)
Saved
When i refresh the table meta data, the "Change Description" column lists as 'remove Column' - which i don't understand
Deployed
Refresh Power BI
get a fail message from power BI that the field doesn't exist.
what am i missing in the step process?
cheers in advance
Hi WonkyMeister ,
Thanks for getting back."Update Table Schema from Source" does exist in older versions (TE2.x), but it only works with Legacy data sources that use SQL partitions. If your model uses Power Query (M) partitions, you won't see that option.
You can check by clicking on the table in TE and looking at the partition - if the expression starts with let or uses M syntax, it's a Power Query partition. If it's a plain SQL SELECT statement, it's a Legacy partition.
If it's Power Query: open the partition expression in TE and confirm the underlying SQL within your M query actually returns the new CASE column you created. Since you've already added it at the SQL source level, just make sure the partition's query references it. Then hit "Refresh Metadata" - TE should detect the new column automatically from the query without you needing to manually add anything.
If it's Legacy SQL: you should see the "Update Table Schema" option when you right-click the table.If it's still not appearing, let us know your TE version and we can troubleshoot further.
8 Replies
- Vinodh247Super User
You are mixing model metadata vs source schema changes. In Tabular Editor, when you manually add a column, it exists only in the model, not in the underlying source query. On refresh, PBI re-reads the schema from the source (SQL/M query), sees that this column does not exist there, and flags it for removal, which is why you see “remove column” and the refresh fails.
Fix is simple: do not add the column manually in Tabular Editor. Instead, add it in the source layer that feeds the model (SQL view, Power Query, or table expression). Then refresh metadata so the column is discovered automatically. Tabular Editor is meant for semantic modeling (measures, relationships, calc cols), not for introducing new physical columns that are not part of the source.
- WonkyMeisterNew Member
Thanks for reply!
so i need to add the new column into the power BI model prior to deploying from Tab Ed?
- v-veshwara-msftCommunity Support
Hi WonkyMeister ,
Thanks for the follow-up.Your SQL and the partition query in Tabular Editor are already updated, so those steps are fine. The issue is that after updating the partition query, you manually right-clicked and added a data column. That creates a column in the model metadata that TE can't match back to the source, which is why it flags it as "remove column".
Instead of manually adding the column, right-click the table and select Update Table Schema from Source. This picks up the new column from the partition query automatically. Then deploy and refresh in Power BI as normal.
Reference:
Import Tables | Tabular Editor Documentation
Hope this helps. Please reach out for further assistance.
Thank you.
- WonkyMeisterNew Member
thanks for the reply, much appreciated.
i don't have this option: "Instead of manually adding the column, right-click the table and select Update Table Schema from Source. This picks up the new column from the partition query automatically. Then deploy and refresh in Power BI as normal."
i think i'm using an old free version of tab ed. Only option i seem to have is refresh metadata
- v-veshwara-msftCommunity Support
Hi WonkyMeister ,
Just checking in to see if your query is resolved and if any responses were helpful.
Otherwise, feel free to reach out for further assistance.Thank you.