Count / Distinct - Total of unique values based on logic.
Hi,
I have a sheet that holds vendor and contract information. Each vendor can have multiple contracts (rows).
3 of the columns are "Vendor" and "Contract Status" and "Contract Type".
I have a separate metric sheet.
In the metric sheet, using ranges, I want to be able to show:
- The number of unique / distinct vendors.
- I can do this with the formula =COUNT(DISTINCT({Contracts - Vendor}))
- What I want to do is count the the number of vendors that where "Contract Status" = "Active" and where "Contract Type" = "SFO".
So in the table example below. There would be 4 Vendors with "Active" and "SFO" contracts.
Any help would be great.
Thanks.
Best Answer
-
Hi Nick,
Thanks very much, It now works.
HS
Answers
-
HI @Head Scratch,
This formula should do what you're after, I think:
=COUNT(DISTINCT(COLLECT(Vendor:Vendor, [Contract Status]:[Contract Status], "Active", [Contract Type]:[Contract Type], "SFO"))).
Hope this helps, and if something is amiss or you've any questions etc. then just post! 😊
-
Hi Nick,
Thanks very much, It now works.
HS
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.5K Get Help
- 424 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 145 Just for fun
- 62 Community Job Board
- 465 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 301 Events
- 39 Webinars
- 7.3K Forum Archives