Skip main navigation

£199.99 £139.99 for one year of Unlimited learning. Offer ends on 28 February 2023 at 23:59 (UTC). T&Cs apply

Find out more

Introduction to DAX


Introduction To DAX

Data Analysis Expressions (DAX) is a programming language that is used throughout Microsoft Power BI for creating calculated columns, measures, and custom tables. It is a collection of functions, operators, and constants that can be used in a formula, or expression, to calculate and return one or more values. In Power BI, you can use different calculation techniques and functions to create measures or calculated columns.

Use Calculated Columns
DAX allows you to augment the data that you bring in from different data sources. For example, assume that you are importing data from a database that contains sales transactions.

You can start using DAX by creating a calculated column that multiplies the unit price with the quantity. The calculated column will create a value for each row called Total Price.

The value on the left side of the equal sign is the column name. The text on the right side of the equal sign is the DAX expression. This simple DAX expression takes the quantity value and multiplies it with the unit price value for each individual row.

Total Price = 'Sales OrderDetails'[Quantity] * 'Sales
OrderDetails'[Unit Price]

Use Measures

Calculated columns are useful, but you are required to operate row by row.
For example, consider a situation where you want an aggregation that
operates over the entire dataset and you want the total sales of all rows.

In the Quick measures window, you can select the calculation that you want
and the fields to run the calculation against.

Similar to how you created a calculated column, you can go to the Fields
list and select New measure.

Total Sales = sum('Sales OrderDetails'[Total Price])
This article is from the free online

Microsoft Power BI: Advanced Data Analysis and Visualisation

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education