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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

Countifs multtiple tables

Hi,

 

I have 2 tables an in total 5 columns for the countifs function

Table 1                 Table 2 

Name                   Name

Date                     Date

Handled Mail       

 

I want to count the number of handled mails if there s a match between the name and date columns of both Tables

 

Kind regards,

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

You could create a relationship of the two tables and create a calculated column with IF FUNCTION.

 

Column =
IF (
    AND (
        'Table1'[Date] = RELATED ( 'Table2'[Date] ),
        'Table1'[Name] = RELATED ( 'Table2'[Name] )
    ),
    COUNT ( Table1[Handled Mail] ),
    BLANK ()
)

If you need additional help, please share your data sample and your desired output.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi,

 

I have 2 tables and 5 columns for the COUNTIFS

 

Table Mail          Table Telephone

Name                 Name

Date                   Date

Handled Mail     

 

I want a column in Table Telephone with the handled mail if there is a match between the columns Name and Date of both tables.

 

kinds regards

 

 

v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

You could create a relationship of the two tables and create a calculated column with IF FUNCTION.

 

Column =
IF (
    AND (
        'Table1'[Date] = RELATED ( 'Table2'[Date] ),
        'Table1'[Name] = RELATED ( 'Table2'[Name] )
    ),
    COUNT ( Table1[Handled Mail] ),
    BLANK ()
)

If you need additional help, please share your data sample and your desired output.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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