1 Reply Latest reply on Jul 9, 2018 7:59 AM by chris monger

    Maintain Column Rank When Filtering in Dashboard

    Eskender Abebe

      Hello,

       

      Using crime data I created a proprietary ranking score to give an idea of city "safety". Then when I rank the cities based on that score I will get the appropriate rank, however when I try to filter for the city in the Dashboard I lose my rankings and all cities appear as "Rank 1".

       

       

      I went through the following solutions but was unable to get it to work, I appreciate the help!

      https://community.tableau.com/message/516072?et=watches.email.thread#516072

      How to show rank for filtered list while retaining rank of unfiltered list

        • 1. Re: Maintain Column Rank When Filtering in Dashboard
          chris monger

          Hi Eskender,

           

          The reason it wasn't working is that the order of operations in Tableau calculates the filter before it calculates the rank, so when it tries to rank the city it only sees one there. You can get around this by creating a table calculation with the field that you want to filter by, so they are calculated at the same time.

          I've added a field to the sheet which gives you the option to filter by City and State, hopefully this shows you what needs to be done and you can modify as required. If you want to use this in actions you will need to change some other sheets around a bit to use this field in.