Forum Discussion
Call Agent switching Teams
- 1 year ago
You can create a measure to use as a filter on the slicer visible.
The basic pattern is something like
Agent is visible = VAR MinDate = MIN ( 'Date'[Date] ) VAR MaxDate = MAX ( 'Date'[Date] ) VAR AgentStartDate = SELECTEDVALUE ( 'Agent'[Start date] ) VAR AgentEndDate = SELECTEDVALUE ( 'Agent'[End Date] ) VAR Result = IF ( AgentStartDate <= MinDate && ( AgentEndDate >= MaxDate || ISBLANK ( AgentEndDate ) ), 1, 0 ) RETURN ResultYou may want to tweak the logic a bit to handle cases where someone leaves part way through the year. As it is they would still be included, but you might want to exclude them.
Add the measure to the slicer as a filter, set to only show when the value is 1.
- 1 year ago
You could create another calculation item like
Agent is visible calculation item = VAR MinDate = MIN ( 'Date'[Date] ) VAR MaxDate = MAX ( 'Date'[Date] ) VAR AgentStartDate = SELECTEDVALUE ( 'Agent'[Start date] ) VAR AgentEndDate = SELECTEDVALUE ( 'Agent'[End Date] ) VAR Result = IF ( AgentStartDate <= MinDate && ( AgentEndDate >= MaxDate || ISBLANK ( AgentEndDate ) ), SELECTEDMEASURE () ) RETURN Resultand use that as a page level filter
Only visible agents isn't supposed to be a measure, its a calculation item in a calculation group. Create a new calculation group and then add that code as the calculation item. You should then be able to add the calculation group as a filter at any level ( visual, page, report ) and select the only visible agents calculation item as the option.
I was able to create the calculation item as a page filter. When selected only active agents are shown in the agent name slicer. It does not however affect the call data.
For now I need to add your first suggested measure to each visual.