2 Replies Latest reply on Apr 9, 2018 10:54 AM by José Alberto Bonilla Vera

    Button to automatically select a set of filter values in Sheet/Dashboard

    José Alberto Bonilla Vera

      Hi all,


      We are reengineering a set of reports which are currently in Excel/Powerpoint and then implementing them in Tableau 10.x, that includes different dimensions (all of which are user-selectable). When interacting with the viz, the user will have to select a range of dates for the X axis of the line chart, filter by certain products/subproducts, currencies etc.


      As a part of the reengineering, we've noticed the same visualization (think the same set of metrics, over slightly different dates and with slightly different filters) is present in 6-8 separate reports, and we want to substitute that with a single Tableau graph/viz, with all the dimensions as well as parameters/calculated fields, so the user will be able to replicate all "versions" of said graph and use it for their different reporting needs.


      So far we have progressed good, but the users' feedback is that, while they love having the ability to generate different versions of the viz, they would also like to have a number of "presets" for the filters and parameters, such that, upon clicking a button or selecting a preset from a combo/dropdown, each filter/parameter will automatically be set to certain values, and the graph will be refreshed with all those presets. A (simpler) example of this would be:


      Preset 1

      Product: Cards

      Date range: 2012-2018

      Currency: Pesos

      Region: All

      Graph type: Line


      Preset 2

      Product: Cards

      Date range: January 2017, September 2017, January 2018

      Currency: All

      Region: North

      Graph type: Line


      Preset 3

      Product: Cards, Auto, Personal

      Date range: January 2017-January 2018

      Currency: All

      Region: All

      Graph type: Bar


      Note that we can already accomplish this "manually" (i.e., the viz is already capable of generating the corresponding graphs for each Preset), but what we need is a way to automatically set the filters upon a single click.


      With the help of some consultants we have achieved this by embedding the Tableau viz on a webpage and using the Javascript/Ajax API to modify the parameters/values in the URL and refreshing the graph. However, we will most likely not be able to do a web implementation of the reports before the due date, so we are looking for a native way (or a trick) in Tableau itself in order to do this.


      If someone would help produce an example of how to do this (with the Superstore dataset or whatnot), or can at least provide some insight on whether this is possible in native Tableau (again, without using a webpage and the API), we would be greatly thankful.