EPC Group - Enterprise Microsoft AI, SharePoint, Power BI, and Azure Consulting
Clutch Top Power BI & Data Solutions Company 2026, G2 High Performer, Momentum Leader, Leader Awards
BlogContact
Ready to transform your Microsoft environment?Get started today
(888) 381-9725Get Free Consultation
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌

EPC Group

Enterprise Microsoft consulting with 28+ years serving Fortune 500 companies.

(888) 381-9725
contact@epcgroup.net
4900 Woodway Drive - Suite 830
Houston, TX 77056

Follow Us

Solutions

  • All Services
  • Microsoft 365 Consulting
  • AI Governance
  • Azure AI Consulting
  • Cloud Migration
  • Microsoft Copilot
  • Data Governance
  • Microsoft Fabric
  • vCIO / vCAIO Services
  • Large-Scale Migrations
  • SharePoint Development

Industries

  • All Industries
  • Healthcare IT
  • Financial Services
  • Government
  • Education
  • Teams vs Slack

Power BI

  • Case Studies
  • 24/7 Emergency Support
  • Dashboard Guide
  • Gateway Setup
  • Premium Features
  • Lookup Functions
  • Power Pivot vs BI
  • Treemaps Guide
  • Dataverse
  • Power BI Consulting

Company

  • About Us
  • Our History
  • Microsoft Gold Partner
  • Case Studies
  • Testimonials
  • Blog
  • Resources
  • Contact

Microsoft Teams

  • Teams Questions
  • Teams Healthcare
  • Task Management
  • PSTN Calling
  • Enable Dial Pad

Azure & SharePoint

  • Azure Databricks
  • Azure DevOps
  • Azure Synapse
  • SharePoint MySites
  • SharePoint ECM
  • SharePoint vs M-Files

Comparisons

  • M365 vs Google
  • Databricks vs Dataproc
  • Dynamics vs SAP
  • Intune vs SCCM
  • Power BI vs MicroStrategy

Legal

  • Sitemap
  • Privacy Policy
  • Terms
  • Cookies

© 2026 EPC Group. All rights reserved.

Back to Blog

Top 5 Useful DAX Functions For Beginners

Errin O\'Connor
December 2025
8 min read

Data Analysis Expressions (DAX) is the formula language that powers Power BI, Power Pivot, and Analysis Services. While DAX contains over 250 functions, mastering a core set of five foundational functions gives beginners the ability to build approximately 80% of common business calculations. This guide provides practical examples, syntax breakdowns, and real-world enterprise use cases for each function.

1. CALCULATE: The Most Powerful DAX Function

CALCULATE is arguably the most important DAX function to learn. It evaluates an expression in a modified filter context, allowing you to override, add, or remove filters on your data. Nearly every advanced DAX pattern builds on CALCULATE.

CALCULATE(<Expression>, <Filter1>, <Filter2>, ...)
  • Basic example: Sales in West = CALCULATE([Total Sales], Region[Area] = "West") calculates total sales filtered to only the West region, regardless of any slicer selections on Region.
  • Multiple filters: Premium West Sales = CALCULATE([Total Sales], Region[Area] = "West", Product[Tier] = "Premium") applies both filters simultaneously (AND logic).
  • Remove filters: Total All Sales = CALCULATE([Total Sales], ALL(Products)) removes all filters on the Products table, giving you the grand total regardless of product selections.
  • Why it matters: CALCULATE is the gateway to time intelligence, percentage of total calculations, year-over-year comparisons, and virtually every dynamic calculation in Power BI.

2. SUMX: Row-by-Row Iteration

SUMX is an iterator function that evaluates an expression for each row in a table and then sums the results. It is essential when you need to calculate a value at the row level before aggregating, such as computing line item totals (quantity times price) before summing.

SUMX(<Table>, <Expression>)
  • Line total calculation: Revenue = SUMX(Sales, Sales[Quantity] * Sales[UnitPrice]) multiplies quantity by price for each row, then sums all line totals.
  • Weighted average: Weighted Avg Price = DIVIDE(SUMX(Sales, Sales[Quantity] * Sales[UnitPrice]), SUM(Sales[Quantity])) calculates a true weighted average price.
  • Conditional sum: High Value Sales = SUMX(FILTER(Sales, Sales[Amount] > 10000), Sales[Amount]) sums only sales exceeding $10,000.
  • vs. SUM: SUM simply aggregates a single column. SUMX can evaluate multi-column expressions and apply row-level logic before aggregating. Always prefer SUM when summing a single column for better performance.

3. FILTER: Dynamic Table Filtering

FILTER returns a table that contains only the rows meeting a specified condition. It is commonly used as an argument within CALCULATE, SUMX, COUNTROWS, and other functions to create dynamic subsets of data.

FILTER(<Table>, <FilterExpression>)
  • Basic filter: FILTER(Products, Products[Category] = "Electronics") returns only electronics products.
  • Complex condition: FILTER(Sales, Sales[Amount] > AVERAGE(Sales[Amount])) returns only rows where the sale amount exceeds the overall average.
  • Used with CALCULATE: Above Avg Sales = CALCULATE([Total Sales], FILTER(ALL(Products), Products[Price] > 100)) calculates sales for products priced above $100 regardless of current filters.
  • Performance tip: FILTER is an iterator that evaluates every row in the table. For simple equality filters inside CALCULATE, use direct column filters (e.g., Products[Category] = "Electronics") instead of FILTER for better performance.

4. RELATED: Cross-Table Lookups

RELATED retrieves a value from a related table following an established relationship. It works similarly to VLOOKUP in Excel but leverages the data model's defined relationships, making it more reliable and performant.

RELATED(<Column>)
  • Basic lookup: In a calculated column on the Sales table: Product Category = RELATED(Products[Category]) pulls the category from the Products table for each sales row.
  • Multi-hop relationship: RELATED can traverse multiple relationships. If Sales relates to Products, and Products relates to Suppliers: Supplier Name = RELATED(Suppliers[Name]) works if the relationship chain is established.
  • Direction matters: RELATED follows many-to-one relationships (from the "many" side to the "one" side). Use RELATEDTABLE for one-to-many lookups (from the "one" side to the "many" side).
  • Use cases: Enriching fact tables with dimension attributes, creating denormalized views for calculated columns, and building cross-table conditional logic.

5. ALL: Removing Filters for Context Manipulation

ALL removes all filters from a table or column, returning the complete set of values regardless of the current filter context. It is fundamental for calculating percentages of total, grand totals, and comparative measures.

ALL(<TableOrColumn>)
  • Percentage of total: % of Total Sales = DIVIDE([Total Sales], CALCULATE([Total Sales], ALL(Products))) shows each product's share of total sales.
  • Grand total reference: Grand Total = CALCULATE([Total Sales], ALL(Sales)) always returns the unfiltered total regardless of slicers, filters, or visual-level filters.
  • ALL on a column: CALCULATE([Total Sales], ALL(Products[Color])) removes only the Color filter while preserving all other filters. This is useful for comparing individual values against a partially filtered total.
  • ALLEXCEPT alternative: ALLEXCEPT(Products, Products[Category]) removes all filters except Category, useful for calculating percentage of category total.
  • ALLSELECTED: Similar to ALL but respects external filters (slicers outside the visual). CALCULATE([Total Sales], ALLSELECTED(Products)) gives the total within the slicer context but removes visual-level filters.

Putting It All Together: A Real-World Example

Here is how these five functions combine to create a practical enterprise measure. This example calculates the percentage contribution of each product to its category's total sales, showing only products with above-average revenue.

% of Category (Above Avg) =
VAR _productRevenue = SUMX(
    FILTER(Sales, RELATED(Products[Category]) = MAX(Products[Category])),
    Sales[Quantity] * Sales[UnitPrice]
)
VAR _categoryTotal = CALCULATE(
    [Total Revenue],
    ALLEXCEPT(Products, Products[Category])
)
RETURN
IF(
    _productRevenue > CALCULATE([Average Revenue], ALL(Products)),
    DIVIDE(_productRevenue, _categoryTotal),
    BLANK()
)

Why Choose EPC Group for Power BI Training and Development

EPC Group brings 28+ years of Microsoft consulting expertise and Microsoft Gold Partner credentials to Power BI training and development engagements. Our founder, Errin O'Connor, authored four bestselling Microsoft Press books including comprehensive guides to DAX and Power BI for enterprise deployments. We have trained thousands of analysts across Fortune 500 organizations.

  • Custom DAX training programs from beginner fundamentals to advanced optimization
  • Power BI development services for enterprise semantic models and report suites
  • Performance tuning for DAX measures on large-scale datasets
  • Power BI governance and Center of Excellence (COE) establishment

Want to Accelerate Your Team's DAX Skills?

EPC Group offers custom Power BI training programs that take your team from DAX fundamentals to enterprise-grade measure development in weeks, not months.

Schedule a ConsultationCall (888) 381-9725

Frequently Asked Questions

What is the best way to learn DAX as a beginner?

Start with these five functions (CALCULATE, SUMX, FILTER, RELATED, ALL) and practice building measures in Power BI Desktop using sample datasets like AdventureWorks or Contoso. Resources like the SQLBI.com DAX Guide, Microsoft Learn modules, and EPC Group's training programs provide structured learning paths. Focus on understanding filter context and row context, as these concepts underpin all DAX formulas.

What is the difference between a calculated column and a measure in DAX?

A calculated column is evaluated row by row when data is loaded/refreshed and stored in the model, consuming memory. A measure is evaluated dynamically at query time based on the current filter context. Best practice: use measures for aggregations and KPIs (SUM, AVERAGE, CALCULATE), and use calculated columns only when you need a value at the row level for sorting, filtering, or slicing.

Is DAX similar to Excel formulas?

DAX shares some syntax similarities with Excel (function names like SUM, IF, AVERAGE), but the underlying evaluation model is fundamentally different. Excel operates cell by cell; DAX operates on tables and columns within filter contexts. The concept of filter context, row context, and context transition (via CALCULATE) has no Excel equivalent and is the primary learning curve for Excel users transitioning to DAX.

Why does my CALCULATE measure give unexpected results?

The most common cause is misunderstanding filter context. CALCULATE modifies the filter context by adding or replacing filters. If you use CALCULATE with a column filter like Products[Color] = "Red", it replaces any existing filter on that column. Use KEEPFILTERS() to add filters without replacing existing ones. Test measures in a simple table visual with minimal filters to validate behavior before adding to complex dashboards.

What DAX functions should I learn after these five?

After mastering CALCULATE, SUMX, FILTER, RELATED, and ALL, the next tier of essential functions includes: DIVIDE (safe division), VALUES/DISTINCT (unique value lists), SWITCH (multi-condition branching), time intelligence functions (DATEADD, SAMEPERIODLASTYEAR, TOTALYTD), RANKX (ranking), and SELECTEDVALUE (single slicer value detection). These functions cover most enterprise reporting requirements.

Related Resources

Continue exploring power bi insights and services

power bi

6 Reasons to Use Power Automate in Power BI

power bi

Ad Hoc Reporting

power bi

Add New Data in Power BI

power bi

Agriculture Power BI Consulting

Explore All Services