What problem does it solve?
Converting Query Builder UI state (columns, measures, filters, sorting) into valid DAX queries is error-prone because SUMMARIZECOLUMNS enforces a strict element order and different filter types require different placement. This Skill documents the canonical query shape so generated DAX stays valid and consistent.
Core Features & Use Cases
- Canonical query structure: Defines the strict element order inside SUMMARIZECOLUMNS — attributes first, then column filters via FILTER(KEEPFILTERS(VALUES(...))), then measures as "Display Name", [Measure] pairs.
- Filter handling: Maps filter operators (eq, ne, contains, between, blank, etc.) to DAX predicates, and wraps the table in an outer FILTER for measure filters that cannot live inside SUMMARIZECOLUMNS.
- Sorting and edge cases: Specifies ORDER BY placement after the table expression, legacy fallback behavior, and handling for measures-only queries, empty states, and TOPN wrapping.
- Use Case: When modifying
_build_summarize_dax in src/sempy_labs/semantic_model/_test_dax.py to add a new filter operator, use this Skill to place the predicate correctly and keep the JS serialization and Python helpers in sync.
Quick Start
Generate a DAX EVALUATE query from these columns, measures, filters, and sorting rules using the Query Builder SUMMARIZECOLUMNS pattern.