DAX Aggregation - ADDCOLUMNS function


Advertisements

Description

Adds calculated columns to the given table or table expression.

Syntax

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

Parameters

Sr.No. Parameter & Description
1

table

Table or a DAX expression that returns a table.

2

name

The name given to the column, enclosed in double quotes.

3

expression

DAX expression that returns a scalar expression, evaluated for each row of table.

Return Value

A table with all its original columns and the added ones.

Remarks

--

Example

= ADDCOLUMNS ( 
   Products,"East_Sales", SUMX (RELATEDTABLE(East_Sales), 
      IF([Product] = East_Sales[Product], East_Sales[Sales Amount],0) 
   ) 
) 
dax_functions_aggregation.htm

Useful Video Courses


Video

Mastering DAX and Data Models in Power BI Desktop

53 Lectures 5.5 hours

Abhay Gadiya

Video

Mastering DAX Studio

Featured

24 Lectures 2 hours

Randy Minder

Video

DAX / Power BI - Customer and Sales Analysis Deep Dive

26 Lectures 4.5 hours

Randy Minder

Advertisements