Forum Discussion
Anonymous
7 years agoNot applicable
DAX count unique values after union
Hi everybody, I am trying to create measure counting unique values of particular column, which is the result of UNION of two columns with similar data from two diffrent tables. It looks much easier ...
Anonymous
7 years agoNot applicable
Hi v-xicai ,
Thank you for the reply!
Unfortunately DISTINCT doesn't want to accept table expression after UNION statement...
AkhilAshok
7 years agoSolution Sage
Maybe something like this:
Manager # =
VAR ManagerTable1 =
DISTINCT ( Table1[sales_manager] )
VAR ManagerTable2 =
DISTINCT ( Table2[manager] )
VAR CombinedManagers =
UNION ( ManagerTable1, ManagerTable2 )
VAR UniqueManagers =
DISTINCT ( CombinedManagers )
RETURN
COUNTROWS ( UniqueManagers )