Count of distinct values with error
Hello SmartHeads!
I hope you are doing great!
I have another question regarding formulas.
There are two columns:
"E - Entry Number"
- Important: values in this column can duplicate
Two:
"#Discrepancy_Helper"
This is a helper column checking whether or not there is an error in the row.
Desired outcome:
I have to calculate count of Distinct Entry Numbers with at least 1 Discrepancy (value "Yes")
I have already calculated distinct count of entry numbers, but I don't know how to end up with desired value.
Do you have any ideas?
Thanks,
Roman
Answers
-
Hi @Romano el Polako - Because E-Entry Number could have duplicates, you will need at least one more column in your sheet that makes the row unique. Do you already have one, like an auto-number column or some other guaranteed unique identifier?
-
Hey,
Yes, I have auto-number column, " Smart_Audit_ID "
Thanks,
Romano
-
@Romano el Polako - Apologies, you actually don't need the unique auto-number column for this solution. I was thinking you were asking for something else. You could apply this formula in a column formula or in a Sheet Summary field:
=COUNT(DISTINCT(COLLECT([E-Entry Number]:[E-Entry Number], [#Discrepancy_Helper]:[#Discrepancy_Helper], "YES")))
For a good explanation of how this works, check out https://community.smartsheet.com/discussion/71185/count-unique-values-if-a-criteria-is-met
I hope this helps!
Help Article Resources
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
Check out the Formula Handbook template!