Created by: Paul Pitcher
Creation Date: Aug 16, 2025
Updated Date: Oct 14, 2025

DAX (Data Analysis Expressions)

(also called DAX formula(s), Dax language ) (Wow... did you know that "New Measure" and "quick Measure" are actually DAX Measures. Why doesn't Power BI just call them "DAX Measures"?)
See also: Functions
Data Analysis Expressions - Wikipedia
Here is a list of DAX functions
-DAX helps us to transform data. Note: M formulas also help us to transform the data.
-DAX is the native formula and query language for Power BI and several other Microsoft tools.
-DAX is a domain-specific formula expression language developed by Microsoft. It was developed by the SQL Server Analysis Services (SSAS) team at Microsoft as part of Project Gemini and released in 2009 with the first version of the PowerPivot for Excel 2010 Add-in. DAX is used to handle data models for several of Microsoft's services, including Microsoft PowerPivot, Microsoft Power BI, and SQL Server Analysis. It enables you to interact with data from a wide variety of platforms, such as Power BI, Analysis Services, and Power Pivot on Excel.
-If you know excel formulas than you should be able to pick up DAX pretty easy. Excel formulas were used to create DAX.

Dax Tools
- DAX studio is an open-source tool for writing DAX.

Dax Books
- recommended DAX book.

Overview:

I think with in dax there are a couple of different flavors
-measures: used to find the totals. for example you can use a mesaure to find the total sales for each store.
-Calculated Columns: used to evaluate each row. for example you could click on "table view" on the left hand side and add a new column that combined the "First name" and "Last Name" into a new column called "Full Name"
Another example: lets say that you have a table and each row represents a customer walking into your store making a purchse.
if the purchase is under $100 in a new column you could calculate that this is a "small sale".
if the purchase is over $100 in a new column you could calculate that this is a "Large sale".
you could do a row level calculation where you look at each item sold in your store and you
Sale size = if(TableName[ColumnName]<100, "Small sale","Large Sale")
-used for analytical calculations within Power BI. For example comparing last years income to this years income.

Q: I know how to create a DAX formula. I could also add a column to show the same results? Which should I use?
A: if you want to see the data in a visualization, then use a DAX formula. If you want to see the data in your "Table View" add a column
When to add a MEASURE and when to add a Column in DAX

=== DAX example 1
Q: How do I count how many rows are in a table/view within Power BI?
A: one way of doing this is by using a DAX Measure. To do this first we are going to create a new measure.
1. click on the "Home" tab
2. in the "calculations" section left-clicking on the "new measure" button
3. in the Fields pane type the formula
Total Records = COUNTROWS(TableName)
TIP: You can use any name that you like. You don't have to use "Total Records".

4. drag this measure into a visual to display the total number of records.
tip: your DAX formula will appear on the right hand side where you can see a list of your columns


=== DAX example 2