Forum Discussion
Anonymous
6 years agoNot applicable
Need help with a measure
Hello, Power BI community, need some help. I have two tables : Table1 and Table2 both with fields ID (Unique in each table) and Date (date format). Need to count how many IDs from Table2 are in T...
- 6 years ago
Hi Anonymous
Try this measure in a card visual:
Measure = COUNTROWS ( INTERSECT ( CALCULATETABLE ( DISTINCT ( Table1[ID] ), Table1[Date] < DATE ( 2019, 1, 1 ) ), DISTINCT ( Table2[ID] ) ) )Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers

AlB
Community Champion
6 years agoHi Anonymous
Try this measure in a card visual:
Measure =
COUNTROWS (
INTERSECT (
CALCULATETABLE ( DISTINCT ( Table1[ID] ), Table1[Date] < DATE ( 2019, 1, 1 ) ),
DISTINCT ( Table2[ID] )
)
)
Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers ![]()
Anonymous
6 years agoNot applicable
Thank you! Good idea! I've done it differently, linked two tables by ID. But I like INTERSECT better!