Create distinct string from children of an epic

On the story level I have custom field of “Team Name”.
I created a calculated measure for the Epic that contains all the team names that are working on this epic (from the stories).
I did generate plus order plus filter on the children.
The problem is that I get repetitions of the same team name when the same team is working on multiple stories of the epic.
How can I get distinct list of team names that are working on the stories of an epic (comma separated string).

Thanks.

Ofer

Hi @Ofer_Cohen,

When you check the names of the teams assigned to each story, you get a list that is story-based.
If you are looking for a list of Team Names, you might look from the perspective of Team Name. You might create a list of teams and then filter them by their relation to the stories in Epic. That gives you a set of unique Team Names, which you might then turn into a list of unique names.

You might do that with the following expression.

Generate(
 Filter(
--set of Team Names
  [Team Name].[Team Name].Members,
--filter condition - has related issues with issue type Story
 ([Measures].[Issues created],
  [Issue Type].[Story]) >0),
--retrieve name for each of filtered Team Names
  [Team Name].CurrentMember.Name,
--separated by comma  
  ", ")

Regards,
Oskars / support@eazyBI.com

Hi,
Thanks for the answer :-). This is working fine as long as I do not have a filter in the report. Once I have a filter it does not list ALL the teams that have work on the Epic.
I have created something like that:
CASE WHEN [Issue Type].[Issue Type].getMemberNameByKey(
[Issue].CurrentHierarchyMember.get(‘Issue type ID’)) = “Epic”
THEN
Generate(
ORDER(
Filter(
ChildrenSet([Issue].CurrentHierarchyMember),
[Issue].CurrentHierarchyMember.GetString(‘Team Name’) <>
[Issue].CurrentHierarchyMember.GetString(‘Team Name of Epic’)
),
– Order by
[Issue].CurrentHierarchyMember.GetString(‘Team Name’),
ASC),
[Issue].CurrentHierarchyMember.GetString(‘Team Name’), ', ')
END


The problem is that I get Duplicates, see screen capture. I want to get rid of duplicates.
Temp

Hi @Ofer_Cohen,

Please share more details about the applied filters and the report.
What dimensions are you filtering?
What is the report structure?

If you do not use the Issue dimension, then the standard Issue dimension hierarchy applies, which does not include Stories under Epics.
If you use the “Team Name” dimension in filters - the above option overrides the selection within the filter and leads to excess members.
If you apply some filters to Epics, but filters should not apply to stories underneath Epics, that might require resetting context.

Please share more details or even the definition of your report - Export and import report definitions - to see a better solution.

Regards,
Oskars / support@eazyBI.com