From the course: Power BI Weekly

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

TOPN DAX function

TOPN DAX function - Power BI Tutorial

From the course: Power BI Weekly

TOPN DAX function

- [Instructor] Table manipulation. DAX functions let us either create a new table or manipulate existing tables. We can use them to create a table with a DAX formula or we can use them as filters within a DAX measure formula. The TOPN function lets us select the TOPN rows in a table according to the specified in parameters. In Power BI Desktop, we have an aggregated data table grouped by the energy source for the generation by average megawatt hours and the count of the hours of this generation. Let's first create a new DAX table using the TOPN function in the formula expression. We'll then set up our expression so the TOPN table equals the TOPN table function for the top three rows for the electricity generation our count in our California electricity generation data table. This creates a new table in our Power BI model that consists of the top three energy sources by the counts of hours they are generating electricity. Notice though that although we specified the top three, we see…

Contents