From the course: Advanced Power BI: DAX Language, Formulas, and Calculations
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
CALCULATE DAX function - Power BI Tutorial
From the course: Advanced Power BI: DAX Language, Formulas, and Calculations
CALCULATE DAX function
- [Instructor] CALCULATE is an incredibly powerful and useful function in creating DAX measures. It lets us add conditional logic to our calculations, much like we would in Excel functions like SUMIFS or COUNTIFS. The CALCULATE function consists of two input parameters. Let's explore the second parameter first because we want to think about filtering the data before we perform a calculation on it. We can have as many filters as we would like in the formula and we can apply filters against several fields in the data tables. The first parameter in the CALCULATE function is the aggregate calculation we're performing over the filtered rows, which themselves can be DAX measures or fields inside aggregate functions like SUM or AVERAGE. But it cannot be a naked column without an aggregation. It's important to keep everything in perspective when you're creating a DAX measure. The logic behind creating DAX measures is much harder…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
DAX tables and GENERATESERIES2m 58s
-
(Locked)
DAX columns2m 43s
-
(Locked)
DAX measures3m 41s
-
(Locked)
DATE, YEAR, MONTH, and DAY date DAX functions3m 14s
-
(Locked)
CALENDAR and CALENDARAUTO DAX functions3m
-
(Locked)
DAX measure evaluation context10m 33s
-
(Locked)
CALCULATE DAX function6m 17s
-
(Locked)
DAX ruler using FIRSTDATE, LASTDATE, and PARALLELPERIOD DAX functions5m 58s
-
(Locked)
Challenge: Crop modeling1m 10s
-
(Locked)
Solution: Crop modeling4m 32s
-
-
-
-