2 easy steps to create a Category Ranked Table in Power BI
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.
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.