Overview
Introduction
Comparing three related lists at once, for example three different exports of the same dataset, quickly becomes hard to reason about with only pairwise comparison tools.
Three-List Comparer classifies every value across all three lists in one pass by how many of the three lists it appears in.
What Is Three-List Comparer?
A three-list set comparison tool: it computes, for every distinct value across all three lists, whether it appears in all three, exactly two, or exactly one.
It's the natural three-way generalization of List Comparer, replacing three separate pairwise comparisons with a single combined report.
How Three-List Comparer Works
All three inputs are split into items using the shared selected separator, each forming a set of distinct values.
Every distinct value across the union of all three sets is classified by counting how many of the three sets contain it, then grouped into the all-three, exactly-two, and unique-to-one sections.
When To Use Three-List Comparer
Use it to find values consistent across three data sources versus values that only partially agree.
It's useful for reconciling three versions of a list, for example three team members' independently compiled tag lists.
Often used alongside List Comparer, Common List Item Finder and Distinct List Item Finder.
Features
Advantages
- Classifies every value's membership across all three lists in a single pass, instead of three separate pairwise comparisons.
- Preserves first-seen order across the combined lists within each output section.
Limitations
- The "exactly two" section doesn't identify which specific pair of lists shares each value.
- Comparison is exact and case-sensitive with no trimming applied.
Examples
Best Practices & Notes
Best Practices
- Use List Comparer instead when you only have two lists, since its two-section-plus-both output is simpler to read.
- Follow up with a pairwise List Comparer run if you need to know exactly which two lists share an "exactly two" value.
Developer Notes
Builds three `Set<string>` objects and a combined first-seen-order array from all three inputs' items, then classifies each distinct value by summing three `.has()` boolean checks (`setA.has(x) + setB.has(x) + setC.has(x)` conceptually) into a 1, 2, or 3 count.
Three-List Comparer Use Cases
- Reconciling three independently compiled versions of the same list
- Finding values that only partially agree across three data exports
- Auditing consistency across three related datasets in one pass
Common Mistakes
- Expecting to see which specific pair of lists an "exactly two" value came from; that detail isn't broken out.
- Forgetting all three lists share one separator setting.
Tips
- If a value is missing from the "in all three" section unexpectedly, check for stray whitespace or casing differences across your three lists.
- Chain the "in all three" section into another list tool once you've confirmed full agreement.