2 Replies Latest reply on Mar 28, 2018 11:14 AM by Keegan Keplinger

    Select row of interest, compare to others, but only display row of interest results (aka hide rows of non interest or hide rows returning null)

    Keegan Keplinger

      Let's say I have three people running a marathon, they get three different times.  I don't care who is first place - I care about a particular runner.  I want to make a small card-size dash that says "Runner 5604 placed second" based on their RANK() but not have it display what every other runner ranked.  This is a metaphor for my data (which is proprietary and cannot be shared).

       

      Currently, I use RANK() to rank the runners, then I have a tableau calculation that assess a) whether they are the "runner of interest" and b) what rank they got.  The winner, depending on their rank, will have a different generated sentence.  I use:

       

      if attr([Runner of Interest])='isROI'

      then

       

      if [Index]=1

      then 'Runner got first place!'

      elseif [Index]=2

      then 'Runner got second place.'

      elseif [Index]=3

      then 'Runner lost....'

      END

       

      END

       

      This results in the other two runners getting "null" values (which is perfect) - but... in the final dash, I don't want the other two runner mentioned or shown.

       

      I've been able to isolate the winners using "top N" filters (or INDEX() when TOP N failed due to filtering order) but I can't figure out how to isolate based on "interest" - i.e. some set of rows whose columns meet a certain condition (in this case, when [Runner of Interest]="isROI").

       

      Thanks!