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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.