Power BI: Page 3 - DAX Calculations

Learn how to create and use DAX measures in Power BI to perform calculations on your data.

Introduction to DAX

DAX (Data Analysis Expressions) is the formula language used in Power BI to create measures and calculated columns. It allows you to perform calculations on your data, such as aggregations, filtering, and more. DAX is based on row context and filter context.

Basic DAX Measures

Let's create some basic DAX measures. These measures will allow you to calculate aggregate values from your data.

                        Measure = SUM(Sales[Amount])
                    

This measure calculates the total sales amount from the Sales table.

Filter Context

Filter context is the set of filters that are applied to your data. DAX measures are evaluated within a specific filter context. The filter context defines which rows and columns are considered when evaluating the measure.

Example: Consider a table with columns "Region" and "Sales". A measure like "Total Sales by Region" will evaluate differently based on the filters applied to the "Region" column.

Row Context

Row context refers to the specific row being evaluated within a table. It is typically used in calculated columns, where you can access values from the same row.