top of page
Writer's picturetableaumentor

Rank Function in Tableau



How to Use Rank Function in Tableau?

we are going to discuss the Rank function which is a part of Table functions in tableau. Rank function as the name suggests is used to give the rank to any measure (number related) present in the data set.


How to Use Rank Function in Tableau?


We will be using sample superstore to learn about this. We will be using Orders from the data set.

Add region on rows and Sales on Text card. Then using quick table calculations select RANK function.

The result looks like this:


As we want the rank function to be applied on the aggregate of sales measure, the calculation will be “Rank(Sum([Sales]))” and we can give the name to this calculation. Here in this example, I am going to name the calculation as Rank.

Here we are having all different values and If there is the same value who will be given the better rank? Different users have different requirements to solve this tableau provides us with a few more additional features Rank Dense, Rank Unique and Rank Modified. And also tableau by default picks some properties and one of them is sorting in Descending order. This can be viewed by clicking Edit table calculations:



let us see how these things help us by meeting our requirements.

From the above calculations and types, we can see that when Rank Function is applied it returns the standard competition rank for the current row in the partition.

This will be extremely helpful when we are using the chart to tell the details about which category or region the sales are at best. With these insights, the user or business executives will get to know where they must improve their business.

1,111 views0 comments

Recent Posts

See All

Comments


bottom of page