Forum Discussion
Semantic model not refreshing with synapse due to calculated columns?
- Anonymous1 year ago
Open the pbix file, look at the Steps (or M code) for the query/table and see if any steps are referencing those columns. Sometimes there is a step that removes columns and that is usually where this issues arises.
- 1 year ago
Hi Rbakker888
It looks like there are two main issues causing the refresh failure in your Power BI Semantic Model after modifying the Synapse script and adding calculated columns in Power BI.-
Check if the External Table Exists in Synapse: Open Azure Studio and run
SELECT TOP 10 * FROM dbo.dim_SourceKalender - Check for Object Locking or Permissions Issues
The error suggests the table might be locked by another process.
Try refreshing synapse metadata by running: DBCC FREEPROCCACHE
Checking if another process is using it:
SELECT * FROM sys.dm_tran_locks WHERE resource_database_id = DB_ID('YourDatabase') - Convert a Calculated Column to a Measure
Remove the calculated column and replace it with a measure using DAX.
If your calculated column was: EG: NewColumn = 'Sales'[Amount] * 1.2
Convert it into a measure instead: NewMeasure = SUM('Sales'[Amount]) * 1.2
Update all visuals that reference the column to use the new measure.
If the above information is helpful, please give us Kudos and mark the response as Accepted as solution.
Best Regards,
Community Support Team _ C Srikanth. -
Open the pbix file, look at the Steps (or M code) for the query/table and see if any steps are referencing those columns. Sometimes there is a step that removes columns and that is usually where this issues arises.
I did find this removed collumns inside the query, I then removed those steps but when I try refresh it now it comes with the following error.
DataSource.Error: Microsoft SQL: External table 'dbo.dim_SourceKalender' is not accessible because location does not exist or it is used by another process.
Could not use view or function 'dbo.fact_Orders' because of binding errors.
Details:
DataSourceKind=SQL
DataSourcePath= Azure Server
Message=External table 'dbo.dim_SourceKalender' is not accessible because location does not exist or it is used by another process.
Could not use view or function 'dbo.fact_Orders' because of binding errors.