SELECTCOLUMNS Function (DAX)
How does the SELECTCOLUMNS function (DAX) work?
The SELECTCOLUMNS function (DAX) adds calculated columns to the given table or table expression.
SELECTCOLUMNS Formula Syntax
SELECTCOLUMNS (
<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
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])