Forum Discussion
Abhaykumar
10 years agoMicrosoft Employee
Getting distinct values for multiple columns
Is there a way to get distinct values for multiple columns? Specifically, I want to replicate the following SQL query into PowerBI to create a new table: SELECT DISTINCT Col1, Col2, Col3 FROM Tab...
- 10 years ago
- 10 years ago
Hi Abhaykumar,
Use DAX and in DAX the function SUMMARIZE().
Summarize will pull out distinct values from columns.
So your resultset will be new table from Summarize
Table_Output = Summarize(Table_IN,Col1,Col2,Col3)
I hope it helps !
BR,
Achin
achinm45
10 years agoAdvocate IV
Hi Abhaykumar,
Use DAX and in DAX the function SUMMARIZE().
Summarize will pull out distinct values from columns.
So your resultset will be new table from Summarize
Table_Output = Summarize(Table_IN,Col1,Col2,Col3)
I hope it helps !
BR,
Achin
Anonymous
7 years agoNot applicable
I am trying to create a table that shows the person's unique code, department and name. I am using the Summarize function and am getting duplicates. How do I exclude the duplicate that does not get associated with a department?
Table = Summarize('MO YTD Jan - June Revenue','MO YTD Jan - June Revenue'[Employee Code],'MO YTD Jan - June Revenue'[Department Name])
Thank you!
Kim