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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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