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 - Power BI Tutorial
From the course: Complete Guide to Power BI for Data Analysts by Microsoft Press
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
-
-
-
-
-
-
(Locked)
Learning objectives29s
-
(Locked)
Build a date table5m 29s
-
(Locked)
Disable the auto date/time setting3m 50s
-
(Locked)
Designate a date table3m 1s
-
(Locked)
Build relationship between order date and sales3m 1s
-
(Locked)
Basic time intelligence functions8m 10s
-
(Locked)
Use the CALCULATE function2m 30s
-
(Locked)
-
-
-
-
-
-
-