4 Replies Latest reply on Jun 27, 2016 4:58 AM by Mark Fraser

    Fixed sort for dynamic field?

    Mark Fraser

      Hi all


      This is hopefully something easy I have missed

      In short - I want to retain a fixed sort on a dynamic field.



      I want to retain a fixed sort but the crux of my issue is that field is dynamic.

      I want a report, whereby end users can choose how many products, these products are then grouped together

      Top Sellers >>

      IF [RANK] >= 1 AND [RANK] <= [TOP X]

      THEN "Top " + STR([TOP X])

      ELSE " "



      The issue

      Because Top Sellers is dynamic (its Top + the number from parameter), how do I fix the sort so its always at the top? (the value could be different every time)

      If I call my ELSE group T, Z of anything greater than T (from Top) it works, but I would ideally like a blank/ null.


      An alternative?

      Maybe the answer is to calculate the ELSE group first (i.e. what we don't want) and do it the other way round?!


      Interestingly... It appears if I create a previous manual sort, Tableau remembers it and sorts accordingly, but that's not practical, I can't pre-sort every combination.


      Superstore 9.3.3 attached.

      If anything isn't clear, please let me know

      Thanks in advance!