Introduction

Understanding the ALL function in DAX is crucial for anyone working with Power BI. In this hands-on tutorial, we will explore the ALL function in depth, including its syntax, use cases, and a practical example. Whether you're upskilling your DAX knowledge or preparing for the Microsoft PL-300 (Power BI Data Analyst) exam, mastering the ALL function will provide you with greater control over context in calculations and help you create more impactful reports.

🔍 What is the ALL function?

The ALL function in DAX ignores all filters from a table or column, returning all rows, regardless of any filters applied.

💡
ALL is often used within CALCULATE to modify filter context, making it powerful for dynamic aggregations and comparisons.

📝 Syntax

The syntax of the ALL function is as follows:

ALL(<table_or_column>)

Let's look at the components in detail:

Component Description
<table_or_column> The table or column from which all filters should be ignored.

💻 Practical Example

Now, let's perform an example calculation with the ALL function.

📂 Data

We have already loaded data from an Excel file into Power BI Desktop. There is the following table:

student: Contains student information.

🎯 Goal

We want to calculate the total number of students and ignore any filters for the column enrollment year.

🛠 Use the ALL function

You can view this post with the tier: Academy Membership

Join academy now to read the post and get access to the full library of premium posts for academy members only.

Join Academy Already have an account? Sign In