Forum Discussion
Anonymous
4 years agoNot applicable
Distinct count across two columns
Hi, I'm trying to create a measure that calculates the distinct count of active users across two columns, as in the example below: In both columns there are 4 active users, but my r...
- 4 years ago
Anonymous Essentially MC Aggregations: Multi-Column Aggregations (MC Aggregations) - Microsoft Power BI Community
In your case:
Measure = COUNTROWS( DISTINCT( UNION( SELECTCOLUMNS('Table',"Email",[Sender]), SELECTCOLUMNS('Table',"Email",[Receiver]) ) ) )
Greg_Deckler
4 years agoCommunity Champion
Anonymous Essentially MC Aggregations: Multi-Column Aggregations (MC Aggregations) - Microsoft Power BI Community
In your case:
Measure =
COUNTROWS(
DISTINCT(
UNION(
SELECTCOLUMNS('Table',"Email",[Sender]),
SELECTCOLUMNS('Table',"Email",[Receiver])
)
)
)
Anonymous
4 years agoNot applicable
Thanks a lot! That worked!