From the course: Excel Business Intelligence: Power Pivot, DAX and Data Modeling

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Iterator ("X") functions: RANKX

Iterator ("X") functions: RANKX

All right. Before we move on, I just got to show you guys a demo with RANKX because it works a little bit differently from SUMX, and it's just a really cool function. So I'm back here in my PivotTable. Same setup as before, breaking down the data by product name. And the idea here is to create a new measure that essentially ranks out these products based on total revenue. So let's give this a name along the lines of Product Rank. And if we want specifics, we can just say by revenue. And assigning to transactions is just fine. And now for something like this, this is where RANKX is really useful. Because you can use it to rank fields based on all sorts of expressions and measures and things like that. So let's start with RANKX. Same syntax here. Table then expression. It also has a few extra optional ones for dealing with the rank order and ties and stuff like that. We're just going to stick with the basics for now. But first piece is the table. So which table contains the items that…

Contents