Power BI: Daily Average Pitfalls in DAX
Power BI
Sep 22, 2026 12:51 PM

Power BI: Daily Average Pitfalls in DAX

Microsoft expert Power BI DAX daily average pitfalls, edge case fixes and AI accelerated calculation guidance

Key insights

  • daily average: This video explains why a simple daily average can give misleading results in DAX.
    You must compute the metric per day and divide by the correct number of days, not just rely on raw rows.
  • filter context: DAX evaluates measures inside the current filter context, so the same formula can return different numbers in a card, table, or chart.
    Control filters with functions like CALCULATE and be mindful of how visuals alter the visible data.
  • AVERAGEX: Use AVERAGEX when you need to average a calculated expression per row or per date, rather than averaging a single numeric column.
    Iterators like AVERAGEX evaluate each row or date and can behave differently when dates are missing or filtered.
  • missing dates: Dates with no fact rows can distort averages if you only count existing rows.
    Include a proper date table and explicitly account for empty days when the average should reflect calendar days.
  • denominator: The denominator should reflect the number of days in the current period or the number of visible dates, not the number of fact rows.
    Design measures so totals and subtotals aggregate semantically, not just arithmetically.
  • AI-assisted testing: The workflow shown uses AI to draft candidate measures and then stress-tests them against edge cases like totals, filters, and missing days.
    Generate, test, and refine measures to ensure consistent behavior across visuals and time periods.

Overview of the SQLBI Video

Overview of the SQLBI Video

The SQLBI YouTube video examines what it calls the hidden complexity of a daily average in DAX. It begins by showing that a seemingly simple average can return different values depending on visual layout, filters, and missing rows. The presenters demonstrate how relying on a naïve formula may lead to misleading results in reports, framing the problem as one of validation and design rather than a single syntax issue.

SQLBI highlights that the issue often appears when measures are used across cards, matrices, and charts where totals behave unexpectedly. The video emphasizes that understanding filter context and which dates actually exist in a model is critical. The presenters show examples where totals do not equal the sum of row-level averages, stressing the importance of testing across different visual and temporal scenarios before deploying measures to users.

The Technical Challenge

At the core, the video explains that DAX evaluates expressions within an active filter context, which changes results based on the visual or query. For example, a measure that computes a daily metric per row and then averages those rows may ignore days that have no fact rows. As a result, charts and totals can show values that do not match user expectations for a true day-based average. Missing dates, aggregation behavior, and context transitions create a set of edge cases to consider.

The presenters contrast the use of AVERAGE and AVERAGEX and explain when each function can mislead authors. They show that AVERAGEX calculates an expression across a table and that the table definition matters a great deal. For instance, iterating over a fact table will ignore dates without transactions while iterating over a calendar table will include all dates in the period. Consequently, the choice of table for iteration becomes a major design decision for a correct daily average.

SQLBI’s Approach and the Role of AI

SQLBI documents a workflow in which AI is used to draft an initial measure and then the team stress-tests it with edge scenarios. First, the AI suggestion gives a candidate formula that the authors then validate against multiple visual contexts. Next, SQLBI refines the measure to handle missing days and to ensure totals reflect averages of daily values rather than aggregated sums. AI speeds up the prototype phase, but human testing remains essential to reach a reliable result.

The video argues that this hybrid approach changes the authoring process from trial-and-error to an iterative, test-driven exercise. The presenters demonstrate several failing scenarios, adjust the code, and then show corrected behavior in both matrix totals and time-intelligent views. They stress that AI is a helpful assistant rather than a substitute for domain knowledge and recommend using AI to accelerate experimentation while keeping final validation in the hands of the modeler.

Tradeoffs and Practical Guidance

The video also discusses tradeoffs such as accuracy versus complexity and performance versus clarity. For example, forcing a daily average to include all dates can improve semantic correctness but may add computation cost when using iterators over a large calendar. Conversely, simpler formulas can be faster but risk producing misleading totals or omitting empty days. Authors must balance user expectations, model size, and query performance when choosing an approach.

In practice, SQLBI recommends clear choices: use an explicit calendar table, decide whether missing dates should count in denominators, and test measures in every visual type that users will see. They also suggest documenting the behavior of measures so report consumers understand how totals are calculated, and adding unit-style checks that verify measure behavior for typical edge cases to reduce surprises in production reports.

Conclusion and Key Takeaways

The SQLBI video turns a common DAX task into a case study about robustness and testing. It shows that a daily average is not inherently difficult, but it becomes tricky when reports involve missing dates, different visual aggregations, and time-intelligent calculations. The recommended workflow combines AI-assisted drafting with deliberate edge-case validation to produce trustworthy measures, speeding development while reducing the likelihood of reporting errors.

Report authors should adopt an explicit design mindset: choose whether the denominator counts calendar days or transaction days, build measures against a calendar table when appropriate, and verify results across cards, matrices, and charts. Documenting decisions and including simple checks helps teams manage tradeoffs between performance and semantic accuracy. Ultimately, the video provides practical, actionable guidance for anyone who needs daily averages in Power BI or other DAX-based environments.

Further reading

Power BI - Power BI: Daily Average Pitfalls in DAX

Keywords

DAX daily average, Calculate daily average Power BI, DAX average per day, Power BI DAX time intelligence, DAX context transition explained, DAX performance optimization, Troubleshoot DAX daily averages, DAX running average calculation