4 Replies Latest reply on Oct 20, 2016 11:45 PM by BABOUCARR TOURAY

# How to show year by year increase in Rankings

Hello Everyone,

I'll like to create three tables. One showing only students whose rankings have gotten better year by year, for eg. Mike. Another showing students whose rankings have dropped year by year for eg. Andrew. And the last table showing students whose rankings have stayed flat. eg. Lucy. Dragging "Student" in Rows, "Year" in Columns, and "Rank" in Text shows me all the students with their respective ranks for each year. However, I want to see how they are performing in separate tables. An example of the data set from excel is below. Thank you all for the support!

 year rank Student 2013 1 Andrew 2014 2 Andrew 2015 3 Andrew 2016 8 Andrew 2013 7 Mike 2014 4 Mike 2015 3 Mike 2016 1 Mike 2013 5 Lucy 2014 5 Lucy 2015 5 Lucy 2016 5 Lucy 2013 13 Jane 2014 5 Jane 2015 9 Jane 2016 2 Jane

Regards,

Baboucarr

• ###### 1. Re: How to show year by year increase in Rankings

Baboucarr,

Here is my approach.

Assuming "Getting better" means 2016(Newest year) rank is higher than 2013(Oldest year) rank, and

"Getting worse" means 2016(Newest year) rank is lower than 2013(Oldest year) rank

"Stay Same" means 2016(Newest year) rank equal to 2013(Oldest year) rank

[Rank Delta]

{fixed [Student]: min(if [Year]={fixed:MAX([Year])} then [Rank] END)}

-

{fixed[Student] : min(if [Year]={fixed:MIN([Year])} then [Rank] END)}

[Student Category]

if [Rank Delta] > 0 then "Worse"

elseif [Rank Delta] = 0 then "Same"

elseif [Rank Delta] < 0 then "Better"

END

Thanks,

Shin

9.0 attached

1 of 1 people found this helpful
• ###### 2. Re: How to show year by year increase in Rankings

This is neat and beautiful Shin. Came out just like I wanted. Thank you so much for helping!

• ###### 3. Re: How to show year by year increase in Rankings

You are very welcome and happy to know I could help you.

Thanks,

Shin

• ###### 4. Re: How to show year by year increase in Rankings

Hello Shin,

Hope all is well with you. You helped me some months ago and hope you could spare a few minutes of your time again. Please see tableau workbook attached.

1.) I have a similar data set of student rankings. But somehow when I filter to "better", the result is not accurate. "Better" is showing the student "Jorge" when Jorge's ranking is not improving. Assume that lower numbers are better rankings.

2.) If you filter to "Null," you will see a student like "Susan." Although not ranked in 2017, I would still like to have her under "Same" since her ranking was 33 from 2013 to 2016.

3.)Lastly, I would like to create a new tab where the rank difference for any two years will be calculated for every student. I would like to select any two years and have a calculation performed to find the difference. This would be presented using bars instead of numbers.

Thank you so much!