2 easy steps to create a Category Ranked Table in Power BI

Shashanka Shekhar
Microsoft Power BI
Published in
3 min readFeb 11, 2024

--

Power BI is a platform that allows you to connect to various data sources, transform and model your data, and create interactive dashboards and reports. Power BI can help you gain insights from your data and communicate them effectively.

What is Rank in Power BI?

In Power BI, RANK is a function used in Data Analysis Expressions (DAX) that returns the ranking for the current context within the specified partition, sorted by the specified order. If a match cannot be found then the rank is blank.

There’s also a function called RANKX which is used to return the ranking of a number in a list of numbers for each row in the table argument. It’s a dynamic and essential tool for sorting data in a DAX environment.

These functions are used extensively in sorting the data under various conditions. Whether you’re identifying top customers, analyzing sales figures, or highlighting premier products, ranking is a fundamental calculation used across various industries.

Photo by Sebastien LE DEROUT on Unsplash

The Category Ranked Table

We will be creating the following ranked table:

Here we are ranking each Subcategory in terms of Sum of Sales and in case the sales are same we are assigning them the same rank.

--

--

Shashanka Shekhar
Microsoft Power BI

Contributor for Microsoft Power BI. I like Data Analysis and Data Science. Also I enjoy sports, videogames and Japanese Anime in my free time.