Hi folks,
Need help!!!
I’m working on a formula that aims to plot issue aging on a timeline and encountered an issue where the formula completely ignores the Page Filter unless I explicitly add [Issue Type]
and [Project]
validations in the filter.
This approach works as long as we select a single Issue Type on Page Filter.
Here’s the formula I’m using:
Avg(
Cache(
Filter(
Descendants([Issue].CurrentHierarchyMember, [Issue].[Issue]),
InStr(Generate(EXISTING [Issue Type].[Issue Type].Members, [Issue Type].CurrentMember.Name, ", "), [Measures].[Issue type]) > 0
AND
InStr([Measures].[Issue Project],[Project].CurrentHierarchyMember.Name) > 0
AND
DateCompare([Measures].[Issue created date], [Time].CurrentHierarchyMember.StartDate) <= 0
AND
(IsEmpty([Measures].[Issue resolution date])
OR
DateCompare([Measures].[Issue resolution date], [Time].CurrentHierarchyMember.StartDate) >= 0)
))
,
DateDiffDays(
[Measures].[Issue created date],
[Time].CurrentHierarchyMember.StartDate
)
)
In this formula, [Measures].[Issue type]
always returns a single value (e.g., ‘Task’). However, [Issue Type].CurrentHierarchyMember.Name
may return either a single value or AggregatePageMembers
when multiple issue types are selected on the page filter. So I came up with this idea: InStr(Generate(EXISTING [Issue Type].[Issue Type].Members, [Issue Type].CurrentMember.Name, ", "), [Measures].[Issue type]) > 0
in which consists in iterating PageMembers list, checking if each issue type maches the ones I filtered but It fails on multi-selecting.
In addition, I haven’t had the chance to check it yet, but I believe that once an issue from the set is done or cancelled, it might alter the past in the chart which would make past analysis very unaccurate.
I’m hoping you guys have a better logical and performatic approach.
Thank you very much in advance.