Forum Discussion
SandipGhosh
6 years agoFrequent Visitor
What is the difference between addcolumns and selectcolumns in DAX?
Hi, We all know that both addcolumns and selectcolumns have almost the same syntax and return a table, but I want to know that What is the difference between addcolumns and selectcolumns in DAX? is ...
- 6 years ago
SandipGhosh , In case, addcolumn, exiting column are already selected and you add post that. The column that are there in table part of the addcolumn.
Selectcolumn is select each column/formula with a new name. There is nothing selected beforehand.
Pragati11
Super User
6 years agoHi SandipGhosh ,
- ADDCOLUMNS allows you to add new calculated columns in an existing table.
- SELECTCOLUMNS allows you to select columns from an original table, without starting with the defined structure of the original table
You can refer following links on details on both of these DAX functions:
https://docs.microsoft.com/en-us/dax/addcolumns-function-dax
https://docs.microsoft.com/en-us/dax/selectcolumns-function-dax
In addition in the below blog, it is shown how SELECTCOLUMNS can be a representation of ADDCOLUMNS and SUMMARIZE functions:
https://blog.crossjoin.co.uk/2015/06/01/using-selectcolumns-to-alias-columns-in-dax/
Thanks,
Pragati