## TL;DR
Change how the field is used first. A yesno field in Looker is a display type built on a boolean expression, and it cannot be used in every query position, such as a direct grouping with certain pivots or as a measure input. Replace the query use with the underlying dimension, add a yesno based on a case expression in the view, or define a proper count measure filtered on the field, then rerun the explore.

```text
cannot query field of type yesno
```

## Use this when
- An explore query fails and the error names a field of type yesno.
- The failure appears when the yesno field is added as a pivot, a grouping, or a measure filter.
- The same data queries fine when the underlying source column is used instead.

## Not for this skill when
- The yesno field displays the wrong label but queries run. Fix the sql expression, not the query pattern.
- The error names a field that does not exist at all. That is a missing field problem, not a yesno restriction.

## Steps
1. Reproduce the error in the explore and remove fields one at a time until the yesno field is confirmed as the trigger. Verify: the query runs without the yesno field and fails when it is added in that position
2. Open the view definition and find the yesno field and the sql expression behind it. Verify: you can identify the raw column or expression the yesno label derives from
3. Add or expose a plain dimension for the raw value, typed as string or boolean as the source allows, alongside the yesno field. Verify: the new dimension appears in the field picker after the model deploys
4. Update the failing query, dashboard tile or saved look to use the plain dimension for grouping or filtering and keep the yesno field only where its label is displayed. Verify: the explore query completes and returns the expected rows
5. Where a count by the yesno value is needed, define a count measure with a filter on the plain dimension instead of aggregating the yesno field. Verify: the measure returns counts that match a hand count on the raw column
6. Deploy the LookML change, clear the explore cache, and reopen the dashboard that failed. Verify: every tile using the pattern renders without the yesno error

## Why it happens
The yesno type is a presentation convenience layered on a boolean expression. Because the label is generated, Looker cannot always push it into the generated SQL in grouping or aggregation positions, so it refuses the query rather than returning misleading results. Keeping a queryable raw dimension next to the display field is the standard LookML pattern and removes the restriction without losing the friendly labels.

In LookML a yesno field derives its label from a sql expression that evaluates to true or false, and Looker restricts the places that derived label can be queried. Grouping, pivoting or aggregating in ways that need the raw value produce the cannot query error, even though the field looks normal in the field picker. The reliable pattern is to keep a plain boolean or string dimension for querying and reserve the yesno field for display.

Field notes for Looker specifically. The Admin area holds the diagnostic pages that matter here, System Activity for query history and runtimes, the PDT activity page for derived table builds, and the Content Validator under the content management tools. Keep the browser on the same Looker version as the instance when testing, because explore behaviour and error wording shift slightly between monthly releases. Screenshots from viewers are worth collecting with the exact load time, since Looker support and your own history search both work far better from a timestamp than from a description of slowness.

A practical habit for Looker teams is to keep one test user per permission tier and to test every model change as the most restricted tier, not as an admin. Admins bypass access filters, see every field, and hit warm caches, so admin testing systematically hides the failures viewers get. Pair that with a standing explore that lists the twenty slowest tiles across the instance each week, and most dashboard incidents become follow ups on a report the team already reads, instead of surprises reported by executives in a meeting.
## Variants and edge cases
### Looker cannot query field of type yesno pivot error
The pivot-specific variant of the restriction.
### LookML yesno field measure filter error fix
The measure-focused phrasing for filtered counts.
### Looker explore yesno dimension grouping fails
The grouping variant users hit building tables.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_zFki_GizVQ5Z-46t1lGgQA
