Do the TMs have log in accounts to Tableau Server? If so, you should be able to use the built in "Create User Filter" option under the "Server" menu. Choose each TM's log in account, and then choose which Agents to associate with that log in. I cannot set this up for you, as I don't have access to your server. There may be another way to set this up, but this is the easiest to describe.
I was able to set myself up in the attached screenshot, using your workbook. I set my username to link to Agents 1-5. You can test these filters within Tableau Desktop, before publishing, by choosing users from the bottom right corner of the screen and viewing the results with various users logged in.
Thanks for your reply. I was hoping to do it via a calculated field as we have so many agent and TM movts but this is a workable solution so I will give it a try and see what the admin overhead is like. I also wasn't aware that you could test it by selecting users down the bottom of the page so thanks for the tip as that's going to save me running up and down the stairs testing it with users
Is it not possible to get the LAN ID of the TM into your data source as a field or pull it from another source that holds this information? That way you could use another calculated field to automate the process of managing access to data.
If as you indicate, you expect frequent movement of agents and TMs then User Filters may not be managable as there will be an ongoing need to check the permissions for accuracy after every update of the data set.
The approach using a calculated field removes the need to monitor team restructures as it will be automatically maintained as the dataset is updated (obviously new TM users would still need to be given a server license before they could phsyically access the dashboard but it removes all the other hassles)
I've been playing with this but am obviously missing something very simple as I can't get it to work. Are you able to point me in the right direction for how to phrase the calculated field? I've also been given another request. In addition to TMs only wanting to look at their own teams, the users would like each agent to be able to see the other agents in their team, but not in other teams. e.g.
TM1 would see agents 1-5
Agent 7 would see agents 6-10
Is there a way to do both?