Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I’m having trouble creating a measure to add up the number of unique names in 2 columns
Column 1:
Sam
Tyler
John
Peter
Kate
Jack
Column 2:
Tyler
Bruce
Jack
Kate
Teresa
Tyler
The measure should output the number 8 since there are 8 unique customers (Sam, Tyler, John, Peter, Kate, Jack, Bruce, Teresa)
Solved! Go to Solution.
Hi, @powerbinovice22
You can try the following methods.
Measure:
Measure =
VAR _table =
DISTINCT ( UNION ( ALL ( 'Table'[Column 1] ), ALL ( 'Table'[Column 2] ) ) )
RETURN
COUNTROWS ( _table )
Result:
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@powerbinovice22 , if you just need to count
countrows(Summarize(Union(all(Table[Column1]), Table[Column2])) )
Other wise you need to have common dimension to display name
I tried this but the second column could not be selected so I tried
countrows(Summarize(Union(all(Table[Column1]), all(Table[Column2])) ))
but got an error that too few arguments were passed to the summarize function.
Hi, @powerbinovice22
You can try the following methods.
Measure:
Measure =
VAR _table =
DISTINCT ( UNION ( ALL ( 'Table'[Column 1] ), ALL ( 'Table'[Column 2] ) ) )
RETURN
COUNTROWS ( _table )
Result:
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
106 | |
89 | |
82 | |
76 | |
73 |
User | Count |
---|---|
112 | |
103 | |
96 | |
74 | |
67 |