public CalculatedTable AddCalculatedTable(string name = null, string expression = null) { Handler.BeginUpdate("add calculated table"); var t = CalculatedTable.CreateNew(this, name, expression); Handler.EndUpdate(); return(t); }
public CalculatedTable AddCalculatedTable(string name = null, string expression = null) { if (!Handler.PowerBIGovernance.AllowCreate(typeof(CalculatedTable))) { throw new PowerBIGovernanceException("Adding Calculated Tables to this Power BI model is not supported."); } Handler.BeginUpdate("add calculated table"); var t = CalculatedTable.CreateNew(this, name, expression); Handler.EndUpdate(); return(t); }