2 Replies Latest reply on Sep 29, 2015 7:19 AM by Matt Coles

    Tracking the Report Filter value

    Mahesh Chittigari

      Hello friends,


      Is there any way to track the value selected by user in Report Filter (Single Value list)?


      I am trying to track the report filter value to pass the same to SQL query (Data Source) to filter the data.




        • 1. Re: Tracking the Report Filter value

          Hey Mahesh,


          This might help you to appropriately query the Tableau Server Postgres database:


          Tableau Server stores custom views in the PostgreSQL database, specifically in the repository_data table. The custom_views table can be linked to repository_data to get custom views from the database, using the following SQL script:



          CREATE TEMP TABLE temp1 AS

          SELECT users.id, system_users.name

          FROM users

          INNER JOIN system_users ON users.system_user_id = system_users.id;


              cv.name, cv.view_id, rd.content, t.name,

              lo_export(rd.content, 'c:/MyFolder/' || t.name || '_' || 'CustomView_' || cv.name || '_' || v.name || '.xml')


              customized_views AS cv

              INNER JOIN views AS v

                  ON cv.view_id = v.id

              INNER JOIN repository_data AS rd

                  ON cv.repository_data_id = rd.id

              INNER JOIN temp1 AS t

          ON cv.creator_id = t.id

          WHERE v.name = 'MyView';

          DROP TABLE temp1;



          This script creates .xml files for each customized view in the database, stored in the folder indicated in the script ('C:/MyFolder/" in the above example). The script above also filters for a specific view, but that is not necessary.



          The resulting XML contains all the customizations made on the original view.