
上QQ阅读APP看书,第一时间看更新
Shared views
If a model's source view is shared with other applications and may change or include columns not needed by the model, the Table.SelectColumns() M function can be used:
let
Source = AWProd,
InternetSales = Source{[Schema = "BI_Sales", Item = "vFact_InternetSales"]}[Data],
InternetSalesColumns = Table.SelectColumns(InternetSales,{"ProductKey","OrderDateKey"},MissingField.UseNull)
in
InternetSalesColumns
- Each column required by the table in the model is explicitly selected
- The MissingField.UseNull parameter allows the query to refresh successfully despite a specified column being missing such as when a column's name has changed