Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Consider the following two variables:
VAR A = MembershipHistory[Membership]
VAR B = Memberships[Membership]
Table MembershipHistory and Memberships have some common values in their column Membership and I want their distinct count. How can I join data from both variables so that I could apply distinct count on it. Please help.
Solved! Go to Solution.
@Anonymous Try:
RETURN
COUNTROWS(DISTINCT(UNION(A, B)))
@Anonymous Try:
RETURN
COUNTROWS(DISTINCT(UNION(A, B)))
Hi Greg, that works for this problem, but I also have another measure where the variable A is storing 3 columns and variable B is storing 2 columns. The union will not work there as the no of columns are not same. Can you please help with that too?
Thanks in advance
Hi, @Anonymous
Please check if formula below could help:
COUNTROWS (
DISTINCT ( UNION ( VALUES ( A[Column1] ), VALUES ( B[Column1] ) ) )
)
Best Regards,
Community Support Team _ Eason
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 65 | |
| 43 | |
| 40 | |
| 29 | |
| 19 |
| User | Count |
|---|---|
| 200 | |
| 126 | |
| 103 | |
| 70 | |
| 54 |