Forum Discussion

Rbakker888's avatar
Rbakker888
Icon for Helper II rankHelper II
1 year ago
Solved

Semantic model not refreshing with synapse due to calculated columns?

Hi, I recently joined a new company and we made 1 little change to the synapse scripts so we would have 1 extra column in our PowerBI semantic model, when we tried to update the model tho, it gave er...
  • Anonymous's avatar
    Anonymous
    1 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.

     

  • v-csrikanth's avatar
    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.

    1. Check if the External Table Exists in Synapse: Open Azure Studio and run
      SELECT TOP 10 * FROM dbo.dim_SourceKalender

    2. 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')
    3. 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.