6 Replies Latest reply on Dec 21, 2016 11:26 AM by Joe Proulx

    Struggling with 'Top N by Date' using POSTGRESQL data

    Joe Proulx

      I am creating a dynamic landing page, part of which is a section called "Your last 10 dashboards viewed" on Tableau Server.

       

      Here's what I have so far:

       

      dynam.JPG

       

      This gives me all of the workbooks I've viewed, and the 'Max Date Created' isolates each one to the most recent view of that dashboard. (ie, If I visit a dashboard on 10/1, then 11/1, then 12/1, this view only shows the 12/1 visit). All of that is working as expected.

       

      Where I am lost is how to limit this list to just the top 10. I've tried filtering on Top 10...I've tried seemingly every iteration of the Index() function...and I can't get it to show me a list of 10 workbooks, starting with the one on Weds Dec 21 and ending with the one on Nov 1. I can get it to show me a top 10 occasionally, but it's not the Top 10 in order as shown above...it removes some and my "10th" position becomes a view from September.

       

      Note: The arrows and workbook_url are there to allow us to build a URL action that lets the user click on a workbook and be taken to it.