Returns a table with selected columns from the table and new columns specified by the DAX expressions.
The table from which columns are selected.
The name of the new column to be added.
The expression for the new column to be added.
A table with the same number of rows as the table specified as the first argument. The returned table has one column for each pair of Name, Expression arguments, and each expression is evaluated in the context of a row from the specified Table argument.
SELECTCOLUMNS has the same signature as ADDCOLUMNS, and has the same behavior except that instead of starting with the <Table> specified, SELECTCOLUMNS starts with an empty table before adding columns.
SELECTCOLUMNS keep the data lineage of the columns assigned to a simple column reference. Any different expression breaks the data lineage.
Learn more about SELECTCOLUMNS in the following articles:
Using GENERATE and ROW instead of ADDCOLUMNS in DAX
This article explains how to improve DAX queries using GENERATE and ROW instead of ADDCOLUMNS when you create table expressions. » Read more
Querying raw data to Tabular
This article describes how to extract raw data stored in the Tabular engine, used by Analysis Service Tabular, Power BI, and Power Pivot. » Read more
From SQL to DAX: Projection
This article describes projection functions and techniques in DAX, showing the differences between SELECTCOLUMNS, ADDCOLUMNS, and SUMMARIZE. » Read more
Other related functions are:
Contributors: Alberto Ferrari, Marco Russo
MSDN documentation: https://docs.microsoft.com/en-us/dax/selectcolumns-function-dax