# ExpectColumnDistinctValuesToEqualSet & its output

**URL:** <https://discourse.greatexpectations.io/t/expectcolumndistinctvaluestoequalset-its-output/2395>\
**Category:** GX Core Support\
**Created:** [September 21, 2026, 10:03pm UTC](https://discourse.greatexpectations.io/t/expectcolumndistinctvaluestoequalset-its-output/2395 "2026-09-21T22:03:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KK1259](https://avatars.discourse-cdn.com/v4/letter/k/71c47a/32.png) [@KK1259](https://discourse.greatexpectations.io/u/KK1259)\
**Post date:** [September 21, 2026, 10:03pm UTC](https://discourse.greatexpectations.io/t/expectcolumndistinctvaluestoequalset-its-output/2395/1 "2026-09-21T22:03:22Z")

</div>

Hi, I am using the following expectation to check a column = workitem\_type which should ONLY have value = Bug.

“”"

EXPECTATION#1: Column = workitem\_type (type = Bug only)

Scope : Table-Specific (BUGS)  
Business Rule : workitem\_type column must strictly contain ONLY ‘Bug’.  
Target Column : workitem\_type  
Validation : Value set = [‘Bug’]  
Failure Impact: Critical - Unexpected workitem types present in dataset.

“”"

exp\_workitem\_type\_is\_bug = gx.expectations.ExpectColumnDistinctValuesToEqualSet(  
column=“workitem\_type”,  
value\_set=[“Bug”]  
)

The script correctly fails this expectation & returns

> ```
> {
> 
> "success": false,
> 
> "expectation_config": {
> 
> "type": "expect_column_distinct_values_to_equal_set",
> 
> "kwargs": {
> 
> "batch_id": "gx_sample_data_source-BUGS_asset",
> 
> "column": "workitem_type",
> 
> "value_set": \[
> 
> "Bug"
> 
> \]
> 
> },
> 
> "meta": {},
> 
> "id": "97fd3cfe-8648-47b8-ab09-7dc65899c488",
> 
> "severity": "critical"
> 
> },
> 
> "result": {
> 
> "observed_value": null,
> 
> "unexpected_count": 1,
> 
> "missing_count": 0,
> 
> "partial_unexpected_list": \[
> 
> "Defect"
> 
> \],
> 
> "partial_missing_list": \[\]
> 
> },
> 
> "meta": {},
> 
> "exception_info": {
> 
> "raised_exception": false,
> 
> "exception_traceback": null,
> 
> "exception_message": null
> 
> }
> 
> }
> 
> ```

In my dataset there are 7 rows which has “Defect” instead of “Bug”. I am interested in reporting “7”. Which expectation can help me achieve that. If there is none, then how to use “ExpectColumnDistinctValuesToEqualSet” to get the value = 7.

---

<div class="post-metadata">

**Author:** ![joshstauffer](https://avatars.discourse-cdn.com/v4/letter/j/85e7bf/32.png) [@joshstauffer](https://discourse.greatexpectations.io/u/joshstauffer)\
**Post date:** [September 22, 2026, 12:17pm UTC](https://discourse.greatexpectations.io/t/expectcolumndistinctvaluestoequalset-its-output/2395/2 "2026-09-22T12:17:38Z")

</div>

Hi @KK1259, thanks for the question. The mismatch here is that `ExpectColumnDistinctValuesToEqualSet` is an aggregate Expectation - it builds a set from all the values found in that column, and then validates that the resulting set is equal to parameter `value_set`. You’re describing a row-level check, so the Expectation you’re looking for is `ExpectColumnValuesToBeInSet`. The result includes `partial_unexpected_counts`, which for your example data would return `[{"value": "Defect", "count": 7}]`. Hope that helps!

---

<div class="post-metadata">

**Author:** ![KK1259](https://avatars.discourse-cdn.com/v4/letter/k/71c47a/32.png) [@KK1259](https://discourse.greatexpectations.io/u/KK1259)\
**Post date:** [September 23, 2026, 8:22pm UTC](https://discourse.greatexpectations.io/t/expectcolumndistinctvaluestoequalset-its-output/2395/3 "2026-09-23T20:22:51Z")

</div>

Thank you @joshstauffer , that worked !
