From the course: Mastering Business Intelligence with DAX, Power BI, and Excel by Microsoft Press
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Change context with virtual tables
From the course: Mastering Business Intelligence with DAX, Power BI, and Excel by Microsoft Press
Change context with virtual tables
- [Instructor] In the previous video, we've seen that FILTERs are in fact tables. This video will look at things from another direction. We will learn that tables and tables expressions can be used as FILTERs in CALCULATE statements. This is not only true for the type of tables that you've seen in the previous video, as a matter of fact, any table can be used as a FILTER in CALCULATE. Using tables as FILTERs leads to sophisticated possibilities going beyond what we've seen so far. For example, here we use the TOPN function, which as we've seen create virtual table, containing in this case, the 10 largest customers when it comes to average price. We can use this table as a FILTER argument for the calculation of sales. As another example here you can see that we have a somewhat more complex table expression being a FILTER function applied to VALUES(Product[Product]). So that's the currently selected unique values of the…