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
- Smartsheet Customer Resources
- 63K Get Help
- 380 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 305 Events
- 34 Webinars
- 7.3K Forum Archives