MetricSign
EN|NLRequest Access
Medium severitydata quality

Power BI Refresh Error:
Test Failure: accepted_values

What does this error mean?

A dbt accepted_values test found rows where a column contains a value not in the defined accepted list. The test is designed to catch categorical columns receiving unexpected values.

Common causes

  • 1A new category was added to the source system but the accepted_values list was not updated in dbt
  • 2A source system change renamed an existing category
  • 3NULL values in the column when NULL is not included in the accepted_values list
  • 4Trailing spaces or case differences in the column values (e.g., 'Active ' vs 'Active')
  • 5Test data from development/staging containing values not in the production accepted list

How to fix it

  1. 1Run the failing test with dbt test --select <model> to see the actual failing values
  2. 2Identify the unexpected values: SELECT DISTINCT <column>, COUNT(*) FROM <model> GROUP BY 1
  3. 3If the new values are legitimate, update the accepted_values list in schema.yml
  4. 4If the values are data quality issues, fix the source data or add a transformation to map them
  5. 5Add quote: true to the test if the comparison should be case-insensitive

Frequently asked questions

Does accepted_values check for NULLs?

By default, NULLs are not checked (they pass). Add quote: false and include None in the values list, or set config: {where: 'column IS NOT NULL'} to exclude NULLs.

Can I make accepted_values case-insensitive?

Not directly in the standard test. Create a custom test or add a transformation to uppercase/lowercase the column before testing.

Other data quality errors