Gangula
Gangula

Reputation: 7294

Create Multiple Calculated columns using one DAX formula

Is it possible to create 2 different columns using one DAX Expression?

I have 2 column, for example Work Done this month and Invoiced Amount. I want to create 2 columns using these.

  1. Work Done - Invoiced and return only positive values (Deferred)
  2. Invoiced - Work Done and return only positive values (Extra)

Note: I know how to add these columns using 2 DAX formula's here, but I would like to know if its possible with one formula.

Samsple Screenshot below:
Sample Screenshot

Upvotes: 0

Views: 1731

Answers (1)

Jelle Hoekstra
Jelle Hoekstra

Reputation: 672

I believe it is possible but not within the existing table and it strongly depends on the context on which your are calculating. When your calculation is performed on a row level, ADDCOLUMNS could help you out. It allows you to create a new table and add multiple calculated columns.

https://learn.microsoft.com/en-us/dax/addcolumns-function-dax

Upvotes: 2

Related Questions