Home » DAX » DAX – ADDCOLUMNS function

DAX – ADDCOLUMNS function

ADDCOLUMNS DAX Power Bi

ADDCOLUMNS is DAX aggregation function, used to Adds calculated columns to the given table or table expression.

It’s comes under Table Manipulation DAX Functions category. It will return a table with all its original columns and the added ones.

Syntax:

ADDCOLUMNS(<table>, <name>, <expression>[ <name>, <expression>]…)




Description:

Sno. Parameter Description
1 table Table or a DAX expression that returns a table.
2 name The name given to the new column.
3 expression DAX expression that returns a scalar expression, evaluated for each row of table.

So, Let’s start with an example, You can download the sample Dataset from below link

DAX function - AddColumns Sample Dataset

DAX function – AddColumns Sample Dataset

Step 1: Go to Modeling tab and click on New Table

Create New Table - Power Bi

Create New Table – Power Bi

Step 2:  After that, one DAX formula screen will appears , here we will write DAX formula for ADDCOLUMNS function.

So now, we will multiply ‘Unit Price‘ by 1000 and store into new column ‘TotalPrice‘.

Orders_New = ADDCOLUMNS(Orders, "TotalPrice", Orders[Unit Price]*1000)




Step 3: After that click to commit, it will create new table as name Orders_New and under that table you will see TotalPrice new column, result as below.

Addcolumns DAX funtion

ADDCOLUMNS DAX funtion

Refer more DAX functions: DAX Tutorials

Hope you enjoyed the post. Your valuable feedback, question, or comments about this post are always welcome.

Leave a Reply