Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
94 | |
75 | |
63 | |
62 |
User | Count |
---|---|
143 | |
104 | |
104 | |
80 | |
66 |