ADDCOLUMNS DAX Function in Power BI

The ADDCOLUMNS DAX function adds one or more calculated columns to the given table or table expression. The function returns a table with all its original columns and the added ones specified by the ADDCOLUMNS function.

DAX Syntax ADDCOLUMNS(table, name, expression[, name, expression]…)

The function has the following parameters:

Example: The following is the image of Countries table.

ADDCOLUMNS dax function in Power BI

Let’s create a calculated table.

DAX

New Calculated Table = 
ADDCOLUMNS (
    Countries,
    "GDP Status", IF ( Countries[GDP (Billion USD)] > 5000, "High", "Low" ),
    "Literacy Status", IF ( Countries[Literacy Rate (%)] > 80, "High", "Low" )
)

The output of the above dax code is shown below:

ADDCOLUMNS dax function in Power BI

Here, by the help of ADDCOLUMNS function we are adding two new columns "GDP Status" and "Literacy Status".