My rows are composed of the Project and Issue dimensions.
I have added Project in the Page section and I can filter by Component.
I have a calculated measure Planned_Duration and for each task or sub-task under the Epic, the formula is:
Planned_Duration of the issue / Planned_Duration of the Epic
I tried using the Ancestor function, but now all records are displaying and filtering by Component doesn’t work anymore. For each component, all the records are duplicated.
Is there an alternative on how to get the Epic’s Planned_Duration value and still have the filter working?
In the direct communication you also provided the report definition.
We see from the report definition THAT the main problem in your report was that the measures calculating duration of an issue or its ancestor were based on the issue properties and never checked the actual report context.
In such a situation, the Component dimension is not taken into account during the calculations.
The measures “Issue type”, “Start date”, “End date” and “Duration” are only related to the specific issue and provide the same value regardless of component.
There are several options possible for removing duplicating entries.
One of the options is adding a context-related measure like “Issues created” to the report and filtering rows based on measure values as described here - Create reports.
Another option is to define calculated measures that check the cell relevance to the report context and only perform actual calculations.
That might use a construction like the one below.
CASE WHEN
[Measures].[Issues created]>0
THEN
<here comes the actual expression for calculation>
END
The first option is easier to implement but leaves the filter visible and might have some performance issues on large datasets.
The second option allows more flexibility on conditions and would increase the overall performance. However, that might require creating more calculated measures for displayed issue properties.