Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
sharepointguy21
New Member

Measure to count values in relational tables

I have 3 tables below

Table 1

IDEmail
1abc@contoso.com
2xyz@contoso.com
3test@contoso.com
4123@contoso.com
5321@contoso.com

 

Table 2

IDEmail
1abc@contoso.com
2321@contoso.com

 

Table 3

IDEmail
1123@contoso.com
2aaa@contoso.com

 

Tables 2 and 3 have a relationship with Table 1 on email. I want to create a measure to get the count of emails from Table 1 which have matching emails in Table 2 and Table 3. In the above scenario, the measure should return 3.

1 ACCEPTED SOLUTION
lukiz84
Memorable Member
Memorable Member

Hi,

 

MailCount =
   CALCULATE(
      COUNT('Table 1'[Email]),
      'Table 1'[Email] IN VALUES('Table 2'[Email]) ||
      'Table 1'[Email] IN VALUES('Table 3'[Email])
   )

View solution in original post

1 REPLY 1
lukiz84
Memorable Member
Memorable Member

Hi,

 

MailCount =
   CALCULATE(
      COUNT('Table 1'[Email]),
      'Table 1'[Email] IN VALUES('Table 2'[Email]) ||
      'Table 1'[Email] IN VALUES('Table 3'[Email])
   )

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.