Formula to calculate how many distinct persons responded with a specific answer across tables?

Joined
Jan 30, 2022
Messages
30
Office Version
  1. 365
Platform
  1. Windows
Hi all, I have a body of data with individuals providing information about specific work tasks.

Forgive formatting, on phone, but my data is:

Date | Person | Task | Information.

In my analysis sheet, I have:

Task | Count entries | Count contributors | Sum information.

What I want to show is how many distinct individuals provided information about a task during the study period (not unique, as contributors could provide information about tasks on multiple days).

I have tried SUM(1/COUNTIFS(DataTable[Person], DataTable[Person], DataTable[Task], AnalysisTable[Task])) but that's only worked in the DataTable with a single task type - all else show #DIV/0!

Any help welcome!
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
I can't test at the moment, from memory it should be something like
Excel Formula:
=SUM(IFERROR(1/COUNTIFS(DataTable[Person], DataTable[Person], DataTable[Task], @AnalysisTable[Task]),0))
 
Upvote 0
I can't test at the moment, from memory it should be something like
Excel Formula:
=SUM(IFERROR(1/COUNTIFS(DataTable[Person], DataTable[Person], DataTable[Task], @AnalysisTable[Task]),0))
Unfortunately that just returns 0 instead of #DIV/0!, which would be fine except I know that the result shouldnt be 0 as there is matching data in the respective tables.
 
Upvote 0
Are there empty cells in the columns that the formula refers to?
 
Upvote 0
If this doesn't when then i would have to guess that there is no exact match.

Excel Formula:
=SUM(IFERROR(1/COUNTIFS(DataTable[Person], DataTable[Person], DataTable[Task],DataTable[Task],DataTable[Task],@AnalysisTable[Task]),0))
 
Upvote 0
If this doesn't when then i would have to guess that there is no exact match.

Excel Formula:
=SUM(IFERROR(1/COUNTIFS(DataTable[Person], DataTable[Person], DataTable[Task],DataTable[Task],DataTable[Task],@AnalysisTable[Task]),0))
Definite matches, a bog standard COUNTIF/COUNTIFS works.

I'll keep hacking away at it. First time I've ever known how to do something in PowerBI but not in Excel!!
 
Upvote 0
I just checked my suggestion again and noticed that i had the @ symbol in the wrong place.

I've assumed that the formula is going into the analysis table. If not then you may encounter relative reference problems.
Excel Formula:
=SUM(IFERROR(1/COUNTIFS(DataTable[Person], DataTable[Person], DataTable[Task],DataTable[Task],DataTable[Task],[@Task]),0))
 
Upvote 0
Solution
I just checked my suggestion again and noticed that i had the @ symbol in the wrong place.

I've assumed that the formula is going into the analysis table. If not then you may encounter relative reference problems.
Excel Formula:
=SUM(IFERROR(1/COUNTIFS(DataTable[Person], DataTable[Person], DataTable[Task],DataTable[Task],DataTable[Task],[@Task]),0))
I will give this a go at work tomorrow and let you know! It is in the analysis table.

Thanks very much for taking the time to reply ??
 
Upvote 0
T
I just checked my suggestion again and noticed that i had the @ symbol in the wrong place.

I've assumed that the formula is going into the analysis table. If not then you may encounter relative reference problems.
Excel Formula:
=SUM(IFERROR(1/COUNTIFS(DataTable[Person], DataTable[Person], DataTable[Task],DataTable[Task],DataTable[Task],[@Task]),0))
That worked great! Cheers!
 
Upvote 0

Forum statistics

Threads
1,214,926
Messages
6,122,305
Members
449,079
Latest member
juggernaut24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top