DAX Creating a New Table from an Old Table

I have a table named "Table 1" that looks like this:

col_1     col_2
steve     smith
steve     john
linda     jones
johnny    apple
linda     jones

I want to create a new table that contains only distinct values of those 2 columns, so final result would be:

col_1     col_2
steve     smith
steve     john
linda     jones
johnny    apple

I started playing with SELECTCOLUMNS, but I don't think I'm doing it right, any suggestions?

Upvotes: 1

Views: 203

Answers (2)

Amira Bedhiafi
Amira Bedhiafi

Reputation: 1

Use Summarize() it will pull out distinct values from columns :

Table_Output =  Summarize(Table_IN,Col1,Col2,Col3,...,Coln)

Or Distinct():

Table_Output  = DISTINCT(Table_IN)

Upvotes: 0

Nandan
Nandan

Reputation: 4945

You can use Distinct(table) dax to achieve it. Returns a table by removing duplicate rows from another table or expression.

Upvotes: 2

Related Questions