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.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives