5 Replies Latest reply on May 3, 2018 1:31 PM by Michel Caissie

    Filtering each user by a unique set of Random Numbers

    Chris Felix

      Hi,

       

      I'm working on a project to allow vendors that do not have access to our DB to pull their own set of submission_ids for QA purposes. The custom query I use to populate tableau looks back 6 months and returns the submission_id & date of each request a user worked on.  The query also assigns a random number (RN) for each submission id per user. So the RN for user A will go from 1 to however many submissions user A processed. This is the same for each user. 

       

      The ideal dashboard would allow QA staff to select a date range and select the number of requests per user they need (generally between 10 to 20). Then tableau would filter by RN for the highest 10 random numbers in that date range for each user.  Filtering RN for top 10 will not work because each user has a unique number of RNs.  Filtering RN by bottom 10 will not work because once the data is filtered by date, the RN will start at some unknown number per each user.

       

      Is there some way to do this?  Possibly using a parameter to allow the dashboard viewer to input the number of requests.  And then some kind of calculated field that tells tableau to look at the current range of RN per each user (date filter has been applied), and then only show the 10 rows per each user that have the highest RN number. 

       

      Any thoughts on this are much appreciated!

       

      Sample .tbwx attached

       

      Using Tableau 10.5.3 64-bit