How to count the number of customers ordering at an item - pivot table

Column A: - Unique identification number of product
Column B: Departments ordering


I would like to count the number of  departments ordering  a unique product in Colum A
Lyndall BradleyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ShumsDistinguished Expert - 2017Commented:
Hi,

Sample workbook would be helpful.
0
skullnobrainsCommented:
hmm ... why pivot ?

select A,count(B) from table group by A
0
ShumsDistinguished Expert - 2017Commented:
Probably like this?
You can filter the ID's and pivot will list the count as per department.
Count-Unique-IDs.xlsx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

skullnobrainsCommented:
oups : missed the excel part ;) sorry
if you need a formula for a specific product, something like this should do : count(if(A1:A100 = "myproduct",B1:B100))
0
Lyndall BradleyAuthor Commented:
Thank-you for your replies.

The attached workbook. I would like to know how many times the customers in Colum B orders column A. Thank-you for your time and assistance.
0
skullnobrainsCommented:
you'd need to replace the "sum" by a "count" in the calculated data ( or add an extra column ).
click on the pivot and find where you can add a new "value" or "set of values" which will actually ask for the type of value ( sum, count, count unique ... ) and add the corresponding extra column.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.