The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi,
I want to do a unique count across multiple columns - exactly like this case: https://community.powerbi.com/t5/Desktop/distinct-count-of-multiple-columns/td-p/433060
However, the two columns that I want to use, are not in the same table, so the answer is not sufficient in my case. The two tables are however related (they both have a matching PK/FK)
Table 1:
Column A: ID
Column B: First Name
Table 2:
Column A: ID
Column B: Last Name
I want a distinct count of the two column B. As the data is a live connection, I can't use Power Query.
Solved! Go to Solution.
Try following
Measure = COUNTROWS ( DISTINCT ( UNION ( VALUES ( Table1[First Name] ), VALUES ( Table2[Last Name] ) ) ) )
Try following
Measure = COUNTROWS ( DISTINCT ( UNION ( VALUES ( Table1[First Name] ), VALUES ( Table2[Last Name] ) ) ) )
User | Count |
---|---|
61 | |
59 | |
54 | |
51 | |
33 |
User | Count |
---|---|
179 | |
87 | |
70 | |
48 | |
45 |