logo
search
Power Query Problems

How to Replace Power Query Calculations with DAX in Excel

Kushani NimanthikaKushani Nimanthika Oct 21, 2026 869 views

Question details

The user wants to transition from using Power Query for data unpivoting, delta calculations, and repivoting to using DAX measures and relationships for a more optimized Data Model.

How to Replace Power Query Calculations with DAX in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
Optimizing an Excel data model to produce dynamic PivotTable views using relational tables and DAX instead of fixed query transformations.
Observed behavior
Currently relying on Power Query to reshape data and calculate deltas, the goal is to load structured fact and dimension tables and handle the calculations dynamically via DAX.
Before you start

Ensure your source data is organized logically into fact and dimension tables, and verify that the Power Pivot add-in is enabled in your Excel application.

Solution 1Recommended

Build a Relational Data Model and Create DAX Measures

Load raw tables directly into the Data Model and use explicit DAX measures to calculate scenarios and deltas on the fly, eliminating the need for complex Power Query transformations.

By using DAX (Data Analysis Expressions), you can calculate deltas and scenario values dynamically within the PivotTable context. This simplifies the Power Query refresh process and provides a highly flexible reporting structure.

1
Load structured data to the Data Model

Go to the 'Power Pivot' tab, select your raw data table, and click 'Add to Data Model'. Repeat this step for both your fact table and dimension (scenario) tables.

2
Create table relationships

Open the Power Pivot window, click on 'Diagram View', and drag the related fields (e.g., Scenario ID) to establish connections between your dimension tables and your fact table.

3
Write DAX measures for scenario values

In the Power Pivot window, click the calculation area below your fact table. Use the CALCULATE function to define explicit measures, for example: Actuals := CALCULATE(SUM(Table[Value]), Table[Scenario]="Actual").

4
Calculate dynamic deltas with DAX

Create an additional measure to calculate the variance based on the previously created measures, such as: Delta := [Actuals] - [Budget].

5
Build the PivotTable

Return to the Excel window, click 'Insert' > 'PivotTable' > 'From Data Model'. Place your dimension attributes in rows or columns and your newly created DAX measures into the Values area.

Build a Relational Data Model and Create DAX Measures
Dynamic Filtering and Interactivity: Using DAX in a relational model allows you to seamlessly integrate Slicers and PivotCharts to filter delta data without relying on complex cell formulas or VBA code.
Free Microsoft Office alternative

Try WPS Office for Efficient Data Analysis

While advanced DAX calculations and Power Pivot data modeling are specific to Microsoft Excel, WPS Office offers a powerful, lightweight, and free alternative for comprehensive data management. You can easily build standard PivotTables, utilize calculated fields for deltas, and visualize your data without heavy processing overhead.

  1. 1. Open your data in WPS: Launch WPS Spreadsheets and open your .xlsx file containing the raw dataset.
  2. 2. Insert a PivotTable: Navigate to the Insert tab and click PivotTable to begin summarizing your scenarios.
  3. 3. Add Calculated Fields: Use the built-in Calculated Field option in the PivotTable settings to compute deltas directly without complex DAX.
Fully compatible with Microsoft Excel (.xlsx) formatsCreate advanced PivotTables and dynamic PivotCharts effortlesslyLightweight application that processes large datasets quicklyRich library of built-in statistical and logical formulas
microsoft office alternative - wps office

Frequently Asked Questions

Why should I use DAX instead of Power Query for delta calculations?

Power Query is best used for shaping and cleaning data before it loads. DAX calculations operate dynamically within the Data Model, allowing PivotTables to compute deltas instantly based on user-selected filters and slicers without needing to refresh the query every time.

Can I use slicers with DAX measures?

Yes. When you build a PivotTable from the Data Model, slicers connected to your dimension tables will automatically filter the DAX measures, providing highly interactive and dynamic reporting.

What is the difference between a fact table and a dimension table?

A fact table contains the quantitative transactional data (like sales amounts or budgets) and foreign keys. A dimension table contains descriptive attributes (like scenario names, specific dates, or product categories) that are used to filter and group the data in the fact table.

Do I need a Microsoft 365 subscription to use DAX in Excel?

DAX and the Power Pivot add-in are available in many standalone versions of Excel (such as Office 2016, 2019, and 2021 Professional Plus) as well as Microsoft 365, though exact feature availability may vary depending on your specific license.