From the course: Complete Guide to Power BI for Data Analysts by Microsoft Press

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Use the CALCULATE function

Use the CALCULATE function

- [Instructor] Okay, so in this sub-lesson, we're going to talk about the use of the CALCULATE function. And the CALCULATE function is often considered the most widely used function inside of DAX. And if anybody in this session is an Excel user, it's often described as a turbocharged SUMIF function. So let's go ahead and create this first measure where we're going to try and understand prior year total sales. So I'm going to go over to my sales table. I'm going to right-click and say New measure, once again. I'm going to drop this formula right here. So we're going to call this Prior Year Total Sales. And what we're going to do here is use the CALCULATE function, and it's just going to pull the definition of the CALCULATE function up. "It evaluates an expression in the context modified by the filters." So the filters being what is after the very first position here. So if I click on this as well, I can see that formula like so. I can go ahead and CALCULATE now. Hit enter. And what is…

Contents