From the course: Microsoft Power BI Data Analyst Associate (PL-300) Cert Prep by Microsoft Press
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Use the CALCULATE function - Power BI Tutorial
From the course: Microsoft Power BI Data Analyst Associate (PL-300) Cert Prep by Microsoft Press
Use the CALCULATE function
- [Instructor] In this sub lesson, we are going to use the CALCULATE function. So first a little bit about the CALCULATE function. It is used to alter the filter context. It does so by creating a new filter context and evaluating an expression in that context. The generic syntax is the CALCULATE function, followed by an expression, and then any number of filters after that. So let's go out to the Power BI Desktop and take a look. Okay, so in this particular model here, what I'm going to do is go to my InternetSales table and let's just go ahead and take a look at our Total Sales SUMX function. So really nothing too surprising here. We've seen this function before, basically going through the InternetSales table on a row by row basis and accumulating the multiplication of the UnitPrice and the OrderQuantity. So really nothing too surprising going on here. So we can go ahead and take a look at the Total Sales SUMX on the visual, and when we go and apply that, basically, this function…
Contents
-
-
-
-
-
-
-
(Locked)
Learning objectives34s
-
(Locked)
Create single aggregation measures12m 43s
-
(Locked)
Use the CALCULATE function3m 42s
-
(Locked)
Implement time intelligence measures2m 57s
-
(Locked)
Use basic statistical functions4m 34s
-
(Locked)
Create semi-additive measures4m 44s
-
(Locked)
Create a measure using quick measures5m 10s
-
(Locked)
Create calculated tables or columns5m 57s
-
(Locked)
Create calculation groups9m 38s
-
(Locked)
-
-
-
-
-
-
-