# Excel: Countifs with distinct count

1. ## Excel: Countifs with distinct count

Hello everyone,

Im currently encountering a a bump with trying to implement countifs function with multiple criteria, where in which one of the criteria has to be a distinct count of its values:

This is the base formula im using:
=SUM(COUNTIFS(side[Queue_d],"trms-pi-siv-bap-enforcement",side[defect_type],{"UFR","FPR"},side[is_dsr],"N",side[is_cn],"N"))

So this is the basic countifs formula which is counting these various criterias, but i wanted to make an additional count of a column with only distinct values.

The column i wanted to count distinct values is: side[seller_id]

What i tried to do, is to create a helper column which states if a cell a distinct value or not, and so i created something like this:
=SUM(COUNTIFS(side[Queue_d],"trms-pi-siv-bap-enforcement",side[defect_type],{"UFR","FPR"},side[is_dsr],"N",side[is_cn],"N",side[IsDistinct],"Distinct"))

In the attached document, i have the pivot result next to the countifs formula im using to count the distinct values with the helper column:

But for some reason, it doesnt give me the same result as i get from my pivot table

Would anyone have a solution to my problem?

I would be greatful!

2. ## Re: Excel: Countifs with distinct count

Welcome to the forum

Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

Remember to desensitize the data.

Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

There are currently 1 users browsing this thread. (0 members and 1 guests)