1 Reply Latest reply on Sep 6, 2018 10:16 AM by Aaron Dobbins

    Passing parameters across different stored procedures used in single tableau workbook

    Hemant Puri

      Hi All,

       

      I have a requirement where I need to pass parameter in a dashboard made of one stored procedure which should also work on a different dashboard made of another stored procedure.

       

      Both the dashboards are in the same tableau workbook.

       

      For example,table A below shows total marks of Class A in each subject(data stored in one Stored procedure), whereas table B shows data on the student level that sums up to to subject marks in each column.

       

         

      Table A
      Class A
      SubjectMarks
      Mathematics450
      Humanities445
      Economics439
      English485

       

       

           

      Table B
      Student NameMathematicsHumanitiesEconomicsEnglish
      Student A70656880
      Student B65727382
      Student C83746884
      Student D65697576
      Student E87767285
      Student F80898378

       

      Table C and Table D shows the total and individual height and weight for each student.

       

       

         

      Table C
      Class AHeight1050
      Weight445

       

       

         

      Table D
      Student NameHeightWeight
      Student A17065
      Student B16572
      Student C18374
      Student D16569
      Student E18776
      Student F18089

       

       

      Now Table A and B are stored in one Stored Proc. and Table C and D in other.

       

      Is it possible to that if I apply a filter/parameter on one stored proc, lets say i select Student A from table B  in a filter/parameter and click on it, then it should automatically take me to the other stored proc and show the height and weight for only Student A and not the sum or any other student as I have selected Student A only in the parameter/filter.

        • 1. Re: Passing parameters across different stored procedures used in single tableau workbook
          Aaron Dobbins

          A Dashboard Action filter should do the trick since you have two data sources.  You don't need to pass the selection into the stored procedure.  The second dashboard will load all data up front, but when you click on a row in the first dashboard it will filter all data out of the second dashboard except for your selection.

           

          From the first Dashboard, go to Dashboard > Actions...

           

          From there, click Add Action > in the bottom left and select Filter...

           

          On Source Sheets

          1. uncheck all sheets except for the first sheet you want to drive the filter on the second sheet
          2. Set Run action On: to Select to have the filter to happen immediately

           

          On Target Sheets

          1. Change the dropdown to your second dashboard
          2. uncheck all sheets except for the second sheet you want to be filtered
          3. Set Clearing the Selection Will: to Show All Values, which means when you deselect the student on sheet one, the filter will be cleared from sheet two

           

          On Target Filters

          1. choose All Fields