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.
Understand lesson 9 exercises: Table functions
From the course: Mastering Business Intelligence with DAX, Power BI, and Excel by Microsoft Press
Understand lesson 9 exercises: Table functions
- The first exercise from Lesson 9 is to create a measure that computes the average sales for the top 10 customers, where the top 10 is defined based on the largest sales. So we'll create a measure in the Other folder, and we'll just call it Average Sales Top 10 Customers. And we'll use a variable to define this top 10, just to split it in two parts, so Top10. We can use the TOPN function here, and we want to have the top 10 from the Customer table, so we'll use the Sales measure, and we'll use it in a descending order to get the top 10. Then we'll need to include the RETURN statement, and now we can just use the AVERAGEX function to calculate over this newly defined variable Top10. And we want to include the Sales for those top 10 customers. Like this. Note here that the Customer table is filtered within the current context. So if you add a filter on say a segment or a year, that is also taken into account…
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Learning objectives43s
-
(Locked)
Understand lesson 2 exercises: Semantic models8m 2s
-
(Locked)
Understand lesson 3 exercises: Basic DAX4m 32s
-
(Locked)
Understand lesson 4 exercises: Organize calculations3m 54s
-
(Locked)
Understand lesson 5 exercises: Visual calculations5m 1s
-
(Locked)
Understand lesson 6 exercises: Context6m 49s
-
(Locked)
Understand lesson 7 exercises: Advanced calculations8m 58s
-
(Locked)
Understand lesson 8 exercises: Time intelligence6m 10s
-
(Locked)
Understand lesson 9 exercises: Table functions7m 7s
-
(Locked)
Understand lesson 10 exercises: Table filters22m 57s
-
(Locked)
Understand lesson 11 exercises: WINDOW functions8m 13s
-
(Locked)
Understand lesson 12 exercises: Parameters4m 44s
-
(Locked)
Understand lesson 13 exercises: Calculation groups10m 11s
-
(Locked)
Understand lesson 14 exercises: DAX query view5m 31s
-
(Locked)
-