4 Replies Latest reply on Mar 14, 2018 5:19 AM by Chris Hastie

    Need to have Hierarchical View

    T G

      Hello Champions,

       

      Below is the snapshot of my data set. There are two tables. I want to have the view of all ticket details as per the user login. If there is need of any other mapping table, please let me know.

       

       

      Like, if user 1 login then view will get task_1. Incase of user_2, view will have task_1 & task_2 as user_2 is manager of user_1 and incase of user_4 there will be 3 tasks, task_4, task_2,_task_1.

       

      I have attached the sample workbook_v10.1 also. Please help to get this done

       

      TG

        • 1. Re: Need to have Hierarchical View
          Chris Hastie

          Hi TG,

           

          Firstly I would recommend joining your Ticket Data and User Master tables together, as I have done in the attached example.

           

          I would then recommend adding your user name as a filter in one of the following two ways:

          1. If it doesn't matter if your users are able to change their user name and view information for other users then the simple approach is to add [User Name] as a filter to the view and allow users to change it via a quick-filter.
          2. If your data is more secure and you have a tableau server, use the following formula to create a handy connection between the actual user name of the person logging into the server, and the user name in the data: UPPER([User Name]) = UPPER(USERNAME()). Applying this filter to your sheet will restrict the view down to information solely for the logged in user.  We use UPPER to avoid case sensitivity issues.

           

          I have added this calculation along with the join to the attached dashboard. Let me know if you have any further questions or if this doesn't help you.

           

          Thanks,

          Chris

          • 2. Re: Need to have Hierarchical View
            T G

            Hello Chris,

             

            Thank you so much for your efforts and i really appreciate this. But, i think i didn't explain my requirement accurately.

             

            Example: Refer assignee_id = 4. 4 is manager_id of assignee=2 and 2 is manager_id of 1. So, if user_1 login then view will get task_1. In-case of user_2, view will have task_1 & task_2 as user_2 is manager of user_1 and in case of user_4 there will be 3 tasks, task_4, task_2,_task_1.

             

            I hope now i am able to make myself clear.

             

            TG

             

             

             

            • 3. Re: Need to have Hierarchical View
              Chris Hastie

              Hi TG,

               

              This makes things a bit more complicated as you don't have a single field showing the authorised user(s). I have a few suggestions:

              1. Modify your data structure to include a field listing all authorised users, then tweak your filter to the following. This will check for whether or not the logged in username is within the combined string of authorised users.
                • FIND(UPPER([Authorised User Names]), UPPER(USERNAME())) > 0
              2. Determine an upper limit to the hierarchy and add the appropriate columns. Using your example above, the longest hierarchy is 8 > 4 > 2 > 1. I would therefore have columns for Assignee_ID, Manager_ID_1, Manager_ID_2, Manager_ID_3. You can then blend to multiple copies of your User Master with a separate data source and blend per column, and add a more complicated filter such as the following:
                • UPPER([User Master 1].[User Name]) = UPPER(USERNAME()) OR UPPER([User Master 2].[User Name]) = UPPER(USERNAME()) OR ...
              3. Duplicate the rows in your dataset per user. For example if both User 1 and User 2 can access Task 1, there would be two rows for Task 1. The first row would have User_ID 1 would have User_ID 2. Adding the same filter we discussed last week would then restrict each user to only seeing the rows which contain their user ID.
                • UPPER([User Name]) = UPPER(USERNAME())
              4. Hold your hierarchy in a separate table to blend to. This hierarchy would be similar to the additional columns mentioned  in option (2) however you could join/blend to it via a single Assignee_ID field. This separate hierarchy table could also contain the combined column discussed in option (1) and the calculation from option (1) could be used as the filter

               

              Do any of these solutions seem possible to you?

               

              Kind regards,

              Chris

              InterWorks

              • 4. Re: Need to have Hierarchical View
                Chris Hastie

                Hi TG,

                 

                I'm just going through my old threads and looking at any that weren't closed. Did you manage to solve your problem here? If my solution worked, could you please mark it as the "Correct Answer" as this will make it easier to find for people with a similar issue. If this did not solve your issue, I'm happy to help if you could provide an update?

                 

                Thanks,

                Chris

                InterWorks