Forum Discussion
webportal
7 years agoImpactful Individual
Remove duplicates in summarize table
I want to remove duplicate rows of a union of two tables using DAX. This is my code: Global =
VAR Table1= SUMMARIZE(GLAccounts;GLAccounts[AccountID];GLAccounts[AccountDescription];GLAccou...
- Anonymous7 years ago
DISTINCT () should work for you. Although be aware that as with DAX in general it will be case insensitive.
example
EVALUATE VAR _Table = DATATABLE ( "Column1", STRING, "Column2", STRING, "Column3", INTEGER, { { "A", "a", 1 }, { "A", "A", 1 }, { "A", "B", 2 }, { "A", "B", 2 } } ) RETURN DISTINCT ( _Table )returns
Column 1, Column2, Column3 "A", "a", 1 "B", "B", 2
Anonymous
7 years agoNot applicable
DISTINCT () should work for you. Although be aware that as with DAX in general it will be case insensitive.
example
EVALUATE
VAR _Table =
DATATABLE (
"Column1", STRING,
"Column2", STRING,
"Column3", INTEGER,
{
{ "A", "a", 1 },
{ "A", "A", 1 },
{ "A", "B", 2 },
{ "A", "B", 2 }
}
)
RETURN
DISTINCT ( _Table )returns
Column 1, Column2, Column3 "A", "a", 1 "B", "B", 2