Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
I am trying to get a distinct total for a card visualtions of ID's that have met either or one of the conditions. My issue is arrising as the conditions sit across different tables and i am unsure how to combine them together without double counting the ID's.
Example:
Table 1 | Table 2 | Table 3 | ||||
ID | ID | Type1 | ID | Type2 | ||
1 | 1 | 1 | 1 | a | ||
2 | 1 | 2 | 2 | a | ||
3 | 2 | 1 | 2 | a | ||
4 | 3 | 1 | 3 | b | ||
5 | 4 | 2 | 4 | b | ||
6 | 5 | 1 | 4 | a | ||
7 | 5 | 1 | 5 | b | ||
8 | 6 | 2 | 6 | a | ||
7 | 1 | 6 | b | |||
8 | 1 | 7 | a | |||
7 | a | |||||
7 | b | |||||
8 | a | |||||
8 | b | |||||
8 | b |
I am wanting to count the distint number of ID's that have had at least one Type 1 '1', and/or at least one Type2 'a'. The ID can have both Types, or just one Type to be counted, although the ID should not be counted twice if they have both.
Any help would be appreciated.
Thank you.
Solved! Go to Solution.
Hi @TBSST
Please try
ID Count =
COUNTROWS (
DISTINCT (
UNION (
CALCULATETABLE ( VALUES ( Table2[ID] ), Table2[Type1] = "1" ),
CALCULATETABLE ( VALUES ( Table3[ID] ), Table3[Type2] = "a" )
)
)
)
Hi @TBSST
Please try
ID Count =
COUNTROWS (
DISTINCT (
UNION (
CALCULATETABLE ( VALUES ( Table2[ID] ), Table2[Type1] = "1" ),
CALCULATETABLE ( VALUES ( Table3[ID] ), Table3[Type2] = "a" )
)
)
)
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |