sql-bi / DaxTemplate

Tabular and DAX template engine
MIT License
17 stars 4 forks source link

RemoveExistingColumns does not consider CalculatedTableColumn #8

Closed albertospelta closed 2 years ago

albertospelta commented 2 years ago

https://github.com/sql-bi/DaxTemplate/blob/2f9a635685d168538cfae987807f5fedd95dacbb/Dax.Template/Tables/TableTemplateBase.cs#L411-L412

Should we also exclude columns of type CalculatedTableColumn ?

var listColumns = from c in dateTable.Columns where c is not CalculatedColumn && c is not CalculatedTableColumn select c;
marcosqlbi commented 2 years ago

I don't think so. A calculated column in a calculated table is still a CalculateColumn data type. The CalculatedTableColumn class is for the columns that are part of a calculated table - in that case, the DAX expression is that of the calculated table.