dax-query-guidelines

Provide DAX query syntax and function guidance for Power BI.

1|Updated Feb 13, 2026
One-click install
npx skills add https://github.com/clientfirsttech/power-query-lint-vs-code-extension --skill dax-query-guidelines
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dax-query-guidelines
Source: https://github.com/clientfirsttech/power-query-lint-vs-code-extension/tree/main/skills/dax-query-guidelines
Command: npx skills add https://github.com/clientfirsttech/power-query-lint-vs-code-extension --skill dax-query-guidelines

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps Power BI developers and data professionals write valid, efficient DAX queries by outlining syntax rules, patterns, and best practices.

Core Features & Use Cases

  • Query structure guidance: DEFINE blocks, correct use of DEFINE, MEASURE, and ORDER BY to ensure correct evaluation.
  • Function usage patterns: SUMMARIZECOLUMNS for measures, SUMMARIZE for distinct values, GROUPBY for table variables, and SELECTCOLUMNS for column projection.
  • Time context and TI practices: Establish valid date context for time-intelligence functions and understand best practices for time-based calculations.
  • Practical examples: Illustrative DAX queries showing common workflows like filtering, aggregation, and ranking.

Quick Start

Draft a DAX query using this guide to compare yearly sales by product category.

Frequently Asked Questions about dax-query-guidelines

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a DAX query in Power BI to ensure correct evaluation?

Use SUMMARIZECOLUMNS for measures, SUMMARIZE for distinct values, and GROUPBY for table variables. These DAX function patterns optimize aggregation workflows and ensure valid query output when filtering and projecting columns in Power BI.

How do I establish a valid date context for time-intelligence functions in DAX?

Use DEFINE blocks to declare measures and ORDER BY clauses to sort results. These syntax rules ensure correct evaluation when drafting DAX queries for filtering, aggregation, and ranking workflows in Power BI.

What is the best way to write a DAX query to compare yearly sales by category?

Use SELECTCOLUMNS for column projection to shape table outputs. This DAX function ensures your Power BI queries return only the required columns, optimizing performance when summarizing values across large datasets.

When should I not use SUMMARIZECOLUMNS in a DAX query?

Do not use SUMMARIZECOLUMNS when retrieving distinct values; use SUMMARIZE instead. SUMMARIZECOLUMNS is specifically recommended for measures, while GROUPBY is the correct pattern for table-variable filters in DAX queries.