0
0
Power BIbi_tool~5 mins

Basic arithmetic in DAX in Power BI - Step-by-Step Guide

Choose your learning style9 modes available
Introduction
Basic arithmetic in DAX lets you do simple math like adding, subtracting, multiplying, and dividing numbers in your Power BI data. This helps you create new insights by calculating totals, differences, or ratios directly in your reports.
When you want to calculate total sales by adding amounts from different columns
When you need to find the difference between this year's and last year's revenue
When you want to multiply quantity by price to get total cost
When you want to divide total profit by total sales to get profit margin
When you want to create a new column that shows a simple calculation based on existing data
Steps
Step 1: Open
- Power BI Desktop
The Power BI interface with your data model and report canvas appears
Step 2: Click
- Modeling tab
Modeling options appear including New Measure and New Column buttons
Step 3: Click
- New Measure button
A formula bar opens at the top where you can type your DAX formula
Step 4: Type
- formula bar
The formula bar shows your typed DAX expression
💡 Use simple operators like + for add, - for subtract, * for multiply, / for divide
Step 5: Press
- Enter key
The new measure is created and appears in the Fields pane
Step 6: Drag
- new measure from Fields pane to report canvas
A card or visual shows the calculated result based on your arithmetic formula
Before vs After
Before
Fields pane shows only raw data columns like SalesAmount and Quantity
After
Fields pane shows a new measure named TotalSales with the formula [SalesAmount] * [Quantity], and the report shows the total sales value
Settings Reference
New Measure
📍 Modeling tab
To create a calculation that aggregates or computes values dynamically
Default: No measure created
New Column
📍 Modeling tab
To add a new column with calculated values for each row
Default: No calculated column
Common Mistakes
Using incorrect operators like 'x' instead of '*' for multiplication
DAX only recognizes standard math operators: +, -, *, /
Use '*' for multiplication in your DAX formulas
Typing column names without brackets
DAX requires column names to be enclosed in square brackets to identify them
Always write column names like [SalesAmount] inside square brackets
Creating a measure when a calculated column is needed for row-level calculation
Measures calculate aggregated results, not row-by-row values
Use New Column for row-level arithmetic calculations
Summary
Basic arithmetic in DAX uses simple math operators to create new calculations.
You can create measures or calculated columns to add, subtract, multiply, or divide data.
Remember to use correct syntax: brackets for columns and standard math symbols.