A filter whose values depend on two other filters?
I'm stumped. Is there a way to do this yet?
I have a dashboard with three filters: Client, Department, Team. My underlying data looks like this: client 1:m department; department 1:m team; team 1:m person. The Client filter will always be set to one single client and is never visible to any user of my dashboard.
Both Department and Team have 'Make this filter a child of' set to Client. So only Departments and Teams for the selected Client are listed in the Department and Team filters. So far so good. But...
... if a Department is seleted, I want the Teams filter to only list Teams for the selected Department.
The way my dashboard works now, the Teams filter always displays all the Teams for the Client, regardless of the Department filter selection.
On the Team filter, I tried setting 'Make this filter a child of' to Department to Department. This works as desired when a Department is selected - it only lists the Teams for the selected Department. But when a Department filter is not seleted. the Team filter lists all Teams for all Clients. This must never happen. If a Department is not selected, I need the Team filter to display only the Teams for the selected Client.
TL;DR - I want the filter values of Team to be "where team.client_id = [client] and team.department_id = [department]
I've asked this before, about a year ago, and there was no solution. Perhaps there is a way to do this now?
Hi Dave ! It sounds like you're definitely on the right track here. We want to set up 3 levels of parent-child filters, where Team is a child of Department, which is a child of Client.
From the description above, it sounds like the same Department can appear across different clients. If this is the case, I recommend concatenating the client name to the department name, to ensure the Departments are all unique
This would update your filter selection flow from:
Client A -> Department A -> Team 1
Client A -> Client A Department A -> Team 1
Based on your description, Client will always be pre-selected. This causes the Department filter to populate with the relevant concatenated Client and Department names. The Team filter should remain blank until a Department is selected. When a Department is selected, it will only show Teams belonging to that Department-Client combination.
Our team can definitely assist further upon taking a closer look at exactly how your data is structured here. Feel free to reach out to us via the chat icon at the bottom corner of your screen in-app, and we'd be happy to step through to a solution in greater detail there!Reply
Thanks for helping Nehar. But no, Departments are not shared across Clients. Your solution sounds promising, but may I just explain what I'm after again and perhaps you could confirm your recommended approach?
Clients have their own unique set of Departments. And Departments have their own unique set of Teams.
My users access an embedded dashboard with the Client filter invisible and pre-selected to one Client.
The dashboard has two filters, Department and Team. One displays all the Departments for that Client (parent = Client). One displays all the Teams for that Client (parent = Client). This allows my users to pick a Team without first picking a Department. This use case exists because a user may know the Team name but not know which Department it belongs to.
If a Department is selected in the Department filter, I would like to limit the Teams shown in the Team filter to just the Teams for that Department. If no Department is selected, the Teams filter should list all the Teams for the Client.
Ideally, if a Team was selected, the Department filter would just show the one Department that the selected team belonged to.
The problem with my dashboard right now is that, because both Department and Team have Client set as their Parent, there is nothing stopping a user selecting a Department and then selecting a Team that doesn't belong to that Department.Reply