1 Reply Latest reply on Apr 7, 2013 11:34 AM by Chuck Hooper

    How to set a parameter for each row in a database

    Matthew Petrich


      I have a SQL Server database with 50 rows of employee census data (age, hire date, compensation, expected retirement age, 401(k) balance, etc.)

      I have built a model that helps each employee properly plan for retirement.  Here's my issue; by using filters such as name, department, location, etc. I can filter my list of 50 employess down to 3 (for example) or any number of employees.  For each of the three remaining employees (in this example), I want to override the "expected retirement age" value from the census table with a new value that the employee wants to use.  For example, employee1 had 65 as his/her expected retirement age in the census table but now he/she wants to see what their retirement numbers would look like if he/she were to retire at 70 years of age.  By using parameters, I can easily do this for one employee but in this scenario, the result of filtering is giving 3 employees and they all want their own different retirement ages.  Yes, I could use three parameters but the next time we use the model, the filtering can leave me with 5 employees, 10 emplyees, all 50 employees, etc.  The number of parameters I would need would equal the employees remaining after the filtering.  Is there any way to do this or accomplish this in a totally different fashion?

      Thank you for the help

      Matt Petrich

        • 1. Re: How to set a parameter for each row in a database
          Chuck Hooper

          Matt, my first inclination would be to create a simple CSV or spreadsheet file (EmpID and arbitrary Retirement age) and use Tableau's data blending capability.  Start with your initial worksheet and Blend to this second datasource on EmpID.  Then, you can update each line in the CSV/Spreadsheet file with the desired retirement age - modifying at will, and, refresh the view as changes are made.