5 Replies Latest reply on Oct 15, 2013 4:45 PM by George Gorczynski

    Filtering in a time series

    George Gorczynski

      Here is a scenario I am struggling with:


      I have a list of employees, an associated value (performance) for each year 2005-2013, and a Level. EMP02 gets promoted from level T1 to T2 in 2011. When I filter my employees by level and select T2, I only can display performance of EMP02 since he was promoted to 2011.


      How can I filter by level to select employees who are currently certain level but at the same time see their performance before the promotion?

        • 1. Re: Filtering in a time series
          Matt Lutton

          The "all" selection in the filter will show all results for that employee, but I understand that is not what you want.  Another option may be to put the "Level" on the color shelf, although a break in the line results from this in your example (there is probably a way to make the line connect, but I haven't looked too deeply into that).  Anyway, I've attached the workbook again with the color shelf example, no filter for the "Level" is really needed in this case--but you could still use the filter if you like.  Always more than one way to skin a Tableau problem.  Someone else may have a much better solution! Cheers.

          1 of 1 people found this helpful
          • 2. Re: Filtering in a time series
            Alex Kerin

            There are a number of ways of going about this, somewhat dependant on what the larger dataset looks like and how you would want to filter. The attached is one way. Take a look - feel free to ask questions about the method.


            EDIT: and I may be overcomplicating what you want to achieve - Matthew's method is nice and straightforward.

            1 of 1 people found this helpful
            • 3. Re: Re: Filtering in a time series
              George Gorczynski

              Matthew, thanks, but the real dataset is complex and I already am using color shelf for another purpose.


              Alex, thanks, but I still don't see it. Please see Sheet2 in the attached. When I select Level "T2" I get data for emp02 only for 2011-2013 when he was T2. Still, data for 2005-2010 when emp02 was "T1" doesn't show.

              • 4. Re: Re: Re: Filtering in a time series
                Joshua Milligan



                How about using a calculated set in combination with a parameter?


                Here's what I would propose:

                1. A parameter with all the possible level values (T1, T2, etc...)
                2. A Set using a Condition (see image below)




                The set will contain all the employees with a maximum level that is at least the selected value of the parameter.  Note that this is technically different than the current level -- but might work with the assumptions that:

                1. The levels will have an order such that MAX will select the highest (T1, T2, T3, etc... would be fine... but not T1, T2, A1, A2).  If this isn't true, then you might have to introduce a level order field in the source.
                2. Employees are only promoted and never demoted.  (So for example, if an employee was T2 and is now T1 they will still be included).


                (note: you could change the calculation to MAX([level]) == [Level Param] if you only wanted to get employees who had attained that level and not also employees at higher levels) ([level]) >= [Level Param]MAX([level]) >= [Level Param]


                When you place the set on Filters and show the parameter control you will have the ability to filter and show the history.  If you want to be able to "show all" then you could include another value in the parameter list and change the condition formula to something like:


                [Level Param] == "ALL" OR MAX([level]) >= [Level Param]




                Hope that helps at least spark some ideas!




                1 of 1 people found this helpful
                • 5. Re: Filtering in a time series
                  George Gorczynski

                  Joshua - thanks for the message, this is an interesting approach and definitely sparks ideas for other projects. For this one though it will not cut it. Initial filter needs to isolate all employees at certain Level (e.g. all employees currently at Level T2). And after selecting one employee, the graph needs to display data for that employee for the time period when he was T2, but also historical data when he was T1. In other words.