How does the SELECTCOLUMNS function (DAX) work?

The SELECTCOLUMNS function (DAX) adds calculated columns to the given table or table expression.


     <table>, <name>, <scalar_expression>, [<name>, <scalar_expression>] …

How do you use the SELECTCOLUMNS function?

The SELECTCOLUMNS function simply takes some column / columns from another table and create a new table from them.

Related Blog Posts

Related Support Forum Posts

How to create a new table from many other similar tables
DAX Virtual Table Logic to modify Context
Getting last week (shift specific) data to display in a table

Considerations when using the SELECTCOLUMNS function

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>, <scalar_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.

Related Video Tutorials

Formula examples using the SELECTCOLUMNS function

SELECTCOLUMNS(Info, “StateCountry”, [State]&”, ”&[Country])

= SELECTCOLUMNS ( Products,”Product-NoOfUnits”,Products[Product]&” – “&Products[Units Sold])

Related Course Modules



To access our comprehensive DAX formula reference guide just insert your email address below. The resource will download immediately and we’ll also email it to you.