1 Reply Latest reply on Aug 23, 2018 12:08 PM by Joshua Milligan

    Sorting data in Tableau prep

    Reesha Bhandary

      Hey,

       

      Is there a way to sort the data in tableau prep?  For instance, if the data consists of corporation and its sales for the year, I want to sort data such that I get top 25 corporations based on the highest sales.

       

      Thank You.

        • 1. Re: Sorting data in Tableau prep
          Joshua Milligan

          Reesha,

           

          There are a couple of possibilities:

          1. You can rank in Tableau Prep using a method like this: Rank and Ranking in Tableau Prep | VizPainter.
          2. If your database allows for Custom SQL in Tableau Prep, then you could write a SQL script that either selected the top 25 corporations.  You could then inner join in either the SQL script or Tableau Prep flow to keep only those records.
          3. If your database allows for Custom SQL and also has some kind of Row_Number() function, you could use that to rank the rows.

           

          I'm hoping the functionality here (please vote!) to be implemented in a future release as it could be used to solve this kind of issue too.

           

          Hope that helps!

          Joshua